feat(schedule): expose audited terminal reason writes - #597
Draft
seonghobae wants to merge 22 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
August 26, 2026 23:00
seonghobae
marked this pull request as draft
August 27, 2026 01:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buyer outcome
Refs #287. This stacked Draft exposes the existing schedule reason-event domain and same-connection project-version persistence stack through the project schedule write API for explicit
skippedandnot_performedoutcomes. Cancellation remains outside this bounded slice.Exact current stack
feat/schedule-reason-project-version-287@22883d1667891080bc5c9fdc2c5e721edb7833c7;ae670764a54d451103e72c2453c74ff3f95c198f;8fbd424cbc0a7cb06cc879fa0500c0abf5612529;package.json,server/app.mjs,server/app_core.mjs,tests/api/schedule-reason-collaboration.test.mjs,tests/api/schedule-reason-membership-revocation.test.mjs,tests/api/schedule-reason-route.test.mjs, andtests/unit/toast-accessibility.test.mjs;Implemented route and collaboration contract
POST /api/projects/:id/schedule/reasonsreuses the established session boundary, derives project context server-side, enforces project membership and write role, bounds the request body, requires the current project version, verifies one exact work-item identity in the project snapshot, permits onlyskippedandnot_performed, persists the reason record and project-version transition on the same SQLite connection, and returns the committed reason identity without rewriting task JSON.A successful reason write also publishes the ordinary
project.updateSSE/webhook signal after commit so connected collaborators do not retain stale concurrency state. The committed project version now receives aproject_revisionssnapshot inside the same reason-event SQLite savepoint. The snapshot retains the unchanged project plan, while project version, revision history identity, normalized reason event, and immutable audit evidence commit or roll back together.Current TDD repair evidence
Two current-head review findings were verified against live behavior and repaired test-first rather than treated as informational blockers:
77cc6269d4b8fdc81c13482c3d6c42c4d73740c9proved that a committed reason version was not broadcast. The repair exports and invokespublishProjectUpdateonly after the reason transaction commits; predecessor GREEN Server Tests33031946425proved SSE andproject.updatewebhook delivery.7d2c3ed7ffe8e3a236e9cd7e119a6bace1aae148added a real API regression requiring committed reason version 3 to remain fetchable through/api/projects/:id/revisions/3. Server Tests33034442401, unit/API job98393973898, failed exactly with404 !== 200. GREENae670764a54d451103e72c2453c74ff3f95c198finserts the unchanged snapshot only after the authoritative transition succeeds and inside the existing savepoint.For current head
ae670764a54d451103e72c2453c74ff3f95c198f:33034622472: terminal success; unit/API job98394537504includesschedule reason collaboration notification regression passed, and cloud-e2e is success;33034622517: success;33034622845: success.The current hosted PR Server Tests checkout is synthetic merge revision
41141601b87b6799cca991080b06eaf4ae847406(ae670764...merged into parent22883d166...), not the immutable contributor head. It is strong product/regression evidence but is not treated as exact-contributor-head merge authorization. ScopeWeave #523 owns the repository-native exact-head checkout/coverage control repair;ContextualWisdomLab/.github#1222owns the organization-reusable SAST/Security exact-head control path.Scope fence / merge gate
Keep this PR Draft until the prerequisite stack reaches protected
develop. Then reconcile only this bounded semantic delta onto the fresh integrated base and regenerate every applicable exact-head CI, browser E2E, owned statement/branch/function/line coverage, docstring, CodeQL/SAST/security, dependency/supply-chain, package/provenance, recovery, review, and thread-resolution gate. Valid unresolved findings must remain zero and a qualifying independent current-head approval must exist before merge or auto-merge. Synthetic, predecessor, stale, author-only, model-only, pending, skipped-required, cancelled, absent, neutral-required, failed, or status-only evidence is non-authorizing.Refs #287