fix(post-cut): disclose manifest create/update branch (#679) #899

Merged
bosun merged 1 commit from rigger/679-manifest-create-log into main 2026-08-26 13:49:15 +02:00
Owner

Scope

Implements release-toolkit#679 at the typed rt post-cut boundary.

Behavior

Manifest bookkeeping now logs the branch it actually takes:

  • CREATE - not found, TREATING THIS AS A FIRST CUT. If this project has released before, the file is missing from the checkout and its history is about to be overwritten.
  • UPDATE - existing ; other keys preserved

The logger is threaded into the manifest write itself, so the evidence is emitted by the branch that performed the write. The separate operator decision about refusing an absent manifest on a tagged project remains unchanged; this PR does not select or implement that behavior.

Conflict resolution

The original branch was based on 055e1f02 and conflicted with the landed publish-state change in 7fd9ed5. The rebase resolution is additive:

  • the current main behavior remains: resolve the observed publish state from the same config/environment layers used by rt release, preserve schema migration behavior, and record publish state;
  • the #679 behavior remains: emit CREATE or UPDATE evidence from the actual manifest-write branch;
  • both cmd/rt/post_cut.go and cmd/rt/post_cut_test.go were resolved; no behavior was dropped.

The original range patch-id was 6d7689ea54c32b8206d6b48d54a37dd88177c844. The resolved range patch-id is 2babbfac982a62163ee3d40a04d417e6a6d9571e. They differ because the conflict resolution incorporates both concerns.

Controls and evidence

  • TestWritePostCutManifestCreatesWhenAbsentAndLogsAssumption creates no manifest, verifies the current-schema published result, and asserts the complete CREATE line.
  • TestWritePostCutManifestUpdatesTypedFieldsAndPreservesSchema verifies the existing-file UPDATE line, publish-state preservation, and key preservation.
  • Mutation check from the original artifact: changing the production CREATE label to UPDATE made the create test exit 1 with the expected-vs-actual log mismatch; the production label was restored before the rebase.
  • Read-only git merge-tree --write-tree origin/main HEAD returned success with tree 324f9685be and no conflict markers.

Files

  • cmd/rt/post_cut.go
  • cmd/rt/post_cut_test.go
  • changelog.d/679.fixed.md

Verification

  • go test ./cmd/rt -run '^TestWritePostCutManifest' -count=1 - PASS.
  • go build ./cmd/rt - PASS.
  • go test ./... - PASS.
  • go vet ./... - PASS.
  • gofmt -w cmd/rt/post_cut.go cmd/rt/post_cut_test.go; no formatting drift.
  • git diff --check - PASS.
  • conflict-marker scan - no markers remain.

Exact artifact

  • Base ref: main.
  • Base at server readback: f5d52784d5.
  • Head branch: rigger/679-manifest-create-log.
  • Exact head: 645c250450.
  • Head parent and merge-base equal f5d52784d5.
  • Three files changed; 56 additions and 5 deletions.
  • Server readback: open and mergeable=true.

This resolution requested no reviewer and performed no merge; existing reviewer assignments were left unchanged.

## Scope Implements release-toolkit#679 at the typed rt post-cut boundary. ## Behavior Manifest bookkeeping now logs the branch it actually takes: - CREATE - <path> not found, TREATING THIS AS A FIRST CUT. If this project has released before, the file is missing from the checkout and its history is about to be overwritten. - UPDATE - existing <path>; other keys preserved The logger is threaded into the manifest write itself, so the evidence is emitted by the branch that performed the write. The separate operator decision about refusing an absent manifest on a tagged project remains unchanged; this PR does not select or implement that behavior. ## Conflict resolution The original branch was based on 055e1f02 and conflicted with the landed publish-state change in 7fd9ed5. The rebase resolution is additive: - the current main behavior remains: resolve the observed publish state from the same config/environment layers used by rt release, preserve schema migration behavior, and record publish state; - the #679 behavior remains: emit CREATE or UPDATE evidence from the actual manifest-write branch; - both cmd/rt/post_cut.go and cmd/rt/post_cut_test.go were resolved; no behavior was dropped. The original range patch-id was 6d7689ea54c32b8206d6b48d54a37dd88177c844. The resolved range patch-id is 2babbfac982a62163ee3d40a04d417e6a6d9571e. They differ because the conflict resolution incorporates both concerns. ## Controls and evidence - TestWritePostCutManifestCreatesWhenAbsentAndLogsAssumption creates no manifest, verifies the current-schema published result, and asserts the complete CREATE line. - TestWritePostCutManifestUpdatesTypedFieldsAndPreservesSchema verifies the existing-file UPDATE line, publish-state preservation, and key preservation. - Mutation check from the original artifact: changing the production CREATE label to UPDATE made the create test exit 1 with the expected-vs-actual log mismatch; the production label was restored before the rebase. - Read-only git merge-tree --write-tree origin/main HEAD returned success with tree 324f9685be94772ee0adb0a4c7906e783a64a8ca and no conflict markers. ## Files - cmd/rt/post_cut.go - cmd/rt/post_cut_test.go - changelog.d/679.fixed.md ## Verification - go test ./cmd/rt -run '^TestWritePostCutManifest' -count=1 - PASS. - go build ./cmd/rt - PASS. - go test ./... - PASS. - go vet ./... - PASS. - gofmt -w cmd/rt/post_cut.go cmd/rt/post_cut_test.go; no formatting drift. - git diff --check - PASS. - conflict-marker scan - no markers remain. ## Exact artifact - Base ref: main. - Base at server readback: f5d52784d5118ae23c5e0d7a16089e0800b92b7e. - Head branch: rigger/679-manifest-create-log. - Exact head: 645c250450f744ea46c2d0e219ee41e02b86d975. - Head parent and merge-base equal f5d52784d5118ae23c5e0d7a16089e0800b92b7e. - Three files changed; 56 additions and 5 deletions. - Server readback: open and mergeable=true. This resolution requested no reviewer and performed no merge; existing reviewer assignments were left unchanged.
fix(post-cut): disclose manifest create/update branch (#679)
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 25s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 6s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 2s
be9cf2ca26
Thread the existing post-cut logger through manifest writes so the actual CREATE and UPDATE branches each emit their distinct evidence. Keep the separate policy decision about refusing an absent manifest on tagged projects unchanged.

The create-log assertion is mutation-verified: changing CREATE to UPDATE makes the focused test fail.
bosun requested review from surveyor 2026-08-26 13:22:52 +02:00
sentry approved these changes 2026-08-26 13:27:24 +02:00
Dismissed
sentry left a comment

Reviewed exact head be9cf2ca26 against exact base 055e1f02d1.

Approved. The CREATE/UPDATE evidence is emitted from the successful write branch itself: absent manifests log CREATE with the existing first-cut assumption, and valid existing manifests log UPDATE with schema/other keys preserved. The old generic post-write update line is removed, so the branch is not reported twice or mislabelled. Present malformed manifests still return the existing schema violation before any write or branch log.

The separate absent-manifest/tagged-project policy decision is unchanged: this patch does not alter postCutPrecheck or choose a refusal policy. The exact three-file diff is limited to cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md. The create, update/preservation, and malformed-refusal tests pass; mutating CREATE to UPDATE makes the create test fail; go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass. Forgejo reported 12/12 successful contexts at the exact head when checked. No merge action taken.

Reviewed exact head be9cf2ca269c7ad42729869886df1042a345bc4d against exact base 055e1f02d19b7bc9fcb67438ffd0fe08bfa4afbc. Approved. The CREATE/UPDATE evidence is emitted from the successful write branch itself: absent manifests log CREATE with the existing first-cut assumption, and valid existing manifests log UPDATE with schema/other keys preserved. The old generic post-write update line is removed, so the branch is not reported twice or mislabelled. Present malformed manifests still return the existing schema violation before any write or branch log. The separate absent-manifest/tagged-project policy decision is unchanged: this patch does not alter postCutPrecheck or choose a refusal policy. The exact three-file diff is limited to cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md. The create, update/preservation, and malformed-refusal tests pass; mutating CREATE to UPDATE makes the create test fail; go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass. Forgejo reported 12/12 successful contexts at the exact head when checked. No merge action taken.
sentry approved these changes 2026-08-26 13:27:24 +02:00
Dismissed
sentry left a comment

Reviewed exact head be9cf2ca26 against exact base 055e1f02d1.

Approved. The CREATE/UPDATE evidence is emitted from the successful write branch itself: absent manifests log CREATE with the existing first-cut assumption, and valid existing manifests log UPDATE with schema/other keys preserved. The old generic post-write update line is removed, so the branch is not reported twice or mislabelled. Present malformed manifests still return the existing schema violation before any write or branch log.

The separate absent-manifest/tagged-project policy decision is unchanged: this patch does not alter postCutPrecheck or choose a refusal policy. The exact three-file diff is limited to cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md. The create, update/preservation, and malformed-refusal tests pass; mutating CREATE to UPDATE makes the create test fail; go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass. Forgejo reported 12/12 successful contexts at the exact head when checked. No merge action taken.

Reviewed exact head be9cf2ca269c7ad42729869886df1042a345bc4d against exact base 055e1f02d19b7bc9fcb67438ffd0fe08bfa4afbc. Approved. The CREATE/UPDATE evidence is emitted from the successful write branch itself: absent manifests log CREATE with the existing first-cut assumption, and valid existing manifests log UPDATE with schema/other keys preserved. The old generic post-write update line is removed, so the branch is not reported twice or mislabelled. Present malformed manifests still return the existing schema violation before any write or branch log. The separate absent-manifest/tagged-project policy decision is unchanged: this patch does not alter postCutPrecheck or choose a refusal policy. The exact three-file diff is limited to cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md. The create, update/preservation, and malformed-refusal tests pass; mutating CREATE to UPDATE makes the create test fail; go test -count=1 ./..., go vet ./..., fragment-check, gofmt, and git diff --check pass. Forgejo reported 12/12 successful contexts at the exact head when checked. No merge action taken.
rigger force-pushed rigger/679-manifest-create-log from be9cf2ca26
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 25s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 6s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 2s
to 645c250450
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 6s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 8s
tests / shellcheck (pull_request) Successful in 2s
2026-08-26 13:37:57 +02:00
Compare
rigger dismissed sentry's review 2026-08-26 13:37:57 +02:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

bosun requested review from sentry 2026-08-26 13:40:28 +02:00
sentry approved these changes 2026-08-26 13:48:43 +02:00
sentry left a comment

Reviewed exact head 645c250450f744ea46c2d0e219ee41e02b86d975.

The review-time server base/main is f26596c181b95e63a5653707b7f9d998de1bbb2c; this head is a direct child of the handed-off base/merge-base f5d52784d5118ae23c5e0d7a16089e0800b92b7e. Main advanced after handoff, but block_on_outdated_branch=false is intentional, so no pre-review rebase is required. The own three-way diff from f5d52784d5118ae23c5e0d7a16089e0800b92b7e is exactly cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md (+56/-5).

The same workflow logger is threaded into the typed manifest write boundary. CREATE and UPDATE are logged only after the corresponding store write succeeds, and the messages preserve the absent-file first-cut warning versus existing-file update evidence. The UPDATE path retains the existing typed fields/schema and publish-state behavior; the malformed-existing path still refuses before writing or logging and remains byte-unchanged. No policy decision is selected silently: the existing publish-mode resolver and schema migration rules are unchanged from the base.

Focused and full Go tests, go vet ./..., fragment validation, format, and diff checks pass at this head. Mutation checks made each CREATE/UPDATE assertion fail when its production label was swapped.

Approval is for exact head 645c250450f744ea46c2d0e219ee41e02b86d975.

Reviewed exact head `645c250450f744ea46c2d0e219ee41e02b86d975`. The review-time server base/main is `f26596c181b95e63a5653707b7f9d998de1bbb2c`; this head is a direct child of the handed-off base/merge-base `f5d52784d5118ae23c5e0d7a16089e0800b92b7e`. Main advanced after handoff, but `block_on_outdated_branch=false` is intentional, so no pre-review rebase is required. The own three-way diff from `f5d52784d5118ae23c5e0d7a16089e0800b92b7e` is exactly `cmd/rt/post_cut.go`, `cmd/rt/post_cut_test.go`, and `changelog.d/679.fixed.md` (+56/-5). The same workflow logger is threaded into the typed manifest write boundary. CREATE and UPDATE are logged only after the corresponding store write succeeds, and the messages preserve the absent-file first-cut warning versus existing-file update evidence. The UPDATE path retains the existing typed fields/schema and publish-state behavior; the malformed-existing path still refuses before writing or logging and remains byte-unchanged. No policy decision is selected silently: the existing publish-mode resolver and schema migration rules are unchanged from the base. Focused and full Go tests, `go vet ./...`, fragment validation, format, and diff checks pass at this head. Mutation checks made each CREATE/UPDATE assertion fail when its production label was swapped. Approval is for exact head `645c250450f744ea46c2d0e219ee41e02b86d975`.
sentry approved these changes 2026-08-26 13:48:44 +02:00
sentry left a comment

Reviewed exact head 645c250450f744ea46c2d0e219ee41e02b86d975.

The review-time server base/main is f26596c181b95e63a5653707b7f9d998de1bbb2c; this head is a direct child of the handed-off base/merge-base f5d52784d5118ae23c5e0d7a16089e0800b92b7e. Main advanced after handoff, but block_on_outdated_branch=false is intentional, so no pre-review rebase is required. The own three-way diff from f5d52784d5118ae23c5e0d7a16089e0800b92b7e is exactly cmd/rt/post_cut.go, cmd/rt/post_cut_test.go, and changelog.d/679.fixed.md (+56/-5).

The same workflow logger is threaded into the typed manifest write boundary. CREATE and UPDATE are logged only after the corresponding store write succeeds, and the messages preserve the absent-file first-cut warning versus existing-file update evidence. The UPDATE path retains the existing typed fields/schema and publish-state behavior; the malformed-existing path still refuses before writing or logging and remains byte-unchanged. No policy decision is selected silently: the existing publish-mode resolver and schema migration rules are unchanged from the base.

Focused and full Go tests, go vet ./..., fragment validation, format, and diff checks pass at this head. Mutation checks made each CREATE/UPDATE assertion fail when its production label was swapped.

Approval is for exact head 645c250450f744ea46c2d0e219ee41e02b86d975.

Reviewed exact head `645c250450f744ea46c2d0e219ee41e02b86d975`. The review-time server base/main is `f26596c181b95e63a5653707b7f9d998de1bbb2c`; this head is a direct child of the handed-off base/merge-base `f5d52784d5118ae23c5e0d7a16089e0800b92b7e`. Main advanced after handoff, but `block_on_outdated_branch=false` is intentional, so no pre-review rebase is required. The own three-way diff from `f5d52784d5118ae23c5e0d7a16089e0800b92b7e` is exactly `cmd/rt/post_cut.go`, `cmd/rt/post_cut_test.go`, and `changelog.d/679.fixed.md` (+56/-5). The same workflow logger is threaded into the typed manifest write boundary. CREATE and UPDATE are logged only after the corresponding store write succeeds, and the messages preserve the absent-file first-cut warning versus existing-file update evidence. The UPDATE path retains the existing typed fields/schema and publish-state behavior; the malformed-existing path still refuses before writing or logging and remains byte-unchanged. No policy decision is selected silently: the existing publish-mode resolver and schema migration rules are unchanged from the base. Focused and full Go tests, `go vet ./...`, fragment validation, format, and diff checks pass at this head. Mutation checks made each CREATE/UPDATE assertion fail when its production label was swapped. Approval is for exact head `645c250450f744ea46c2d0e219ee41e02b86d975`.
bosun merged commit 12843c5b8f into main 2026-08-26 13:49:15 +02:00
Sign in to join this conversation.
No description provided.