Repository navigation
Verify chg stories from verified/master (US-47.6) - #1007
Merged
Merged
Conversation
A story bound to a chg change now reaches verified only when the landed trunk commit (data.merge_sha of the newest applied landed event) is an ancestor of verified/master, read through the forge compare API, and no reverted event follows that landing. A forge timeout or error answers 503 chg_trunk_unevaluated with Retry-After; every other gate is unchanged. The gate covers verify, verify-all, bulk verify, backfill and bulk mark-complete. The forge read runs outside the transaction and is applied under the story lock only if it was made for the same landing. mcp-server 3.4.0 documents the new refusals on the verify tools.
The run queued after verify read CI like a pull request and recorded no_story_branch for a chg story. A chg source now records why CI is not read: verify required the landing on verified/master.
Owner
Author
|
Review round 1 (code) counted at |
- Loopctl.Changes.Landings holds the newest-binding and newest-applied- landing reads; ReviewCustody and TrunkEvidence both use them, so the landed-review and trunk gates judge the same landing. - TrunkEvidence reads bindings, landings and reverts in one query each for any batch, and the dead :not_chg branches are gone. - assess/3 and assess_many/3 take an ask? callback: verify, verify-all, backfill and the bulk paths ask the forge only for a story their cheap local gates would pass. verify-all makes its forge reads in one batch. - CiTarget records chg_landed_on_trunk for a story with a change binding, not for every story of a chg-mode source. - The forge stub's transaction probe now reads the calling process's transaction state too, so the bulk paths' task workers are covered. - Doc arities corrected (assess/3, assess_many/3, ensure_mark_complete_allowed/3).
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.
US-47.6: a story bound to a chg change reaches
verifiedonly from verified/master.What changes
Loopctl.Changes.TrunkEvidencedecides it. The landed trunk commit is the newest appliedlandedevent'sdata.merge_sha. The forge compareGET /repos/:repo/compare/<merge_sha>...verified/mastermust answeraheadoridentical. An appliedrevertedevent after that landing refuses without a forge call.verified: verify, verify-all, bulk verify, backfill and bulk mark-complete. It sits next to the US-47.5 landed-review gate. Stories with no change binding never reach the forge.landing_changed, which is unevaluated.PullRequestSource.contains?/3callback is reused, so there is no new egress host.409 chg_landing_not_trunk_verified409 chg_landing_reverted503 chg_trunk_unevaluatedwithRetry-After; the body carriesdecision,reasonandretry_after_seconds.Messages, the chain-of-custody skill, the root CHANGELOG (forge token scope) and the CLAUDE.md citations are all updated.Defaults Mark may want to overrule
guard_backfill/3inlib/loopctl/progress.exandprocess_mark_completeinlib/loopctl/bulk_operations.ex.reasonnames the cause. To change this, editcode/1andretry_after/1intrunk_evidence.ex.Retry-Afteris 30 s by default, or 3600 s when the credential is missing.Post-verify CI run on a chg story
The verification run queued after verify reads CI the way it does for a PR, so on a chg story it used to record
no_story_branch.CiTargetnow answerschg_landed_on_trunkfor a story with a change binding: the same key the trunk gate uses, so an unbound PR-delivered story in a chg-mode project is still read as before. That records why CI was not read: the trunk gate above decided the verdict.Review round (one, /lean-review high)
All 9 findings are fixed in the commit "Review round on #1007":
ci_target.ex: the source mode was used as the trigger. Fixed: the trigger is now the story's binding (Landings.newest_binding/3), and both cases are tested.trunk_evidence_test.exstransaction probe was vacuous on the bulk paths. It now reads the transaction state of the calling process, plus a positive-control test.Loopctl.Changes.Landings.assess/3andassess_many/3now takeask?, so verify, verify-all, backfill and the bulk paths ask the forge only when their local gates pass. Covered by a test that runs every path with no forge call (mutation-checked).assess_many/3.facts/3was N+1. It now makes three set-based queries per batch.:not_chgbranches inassess_manyare removed.ensure_mark_complete_allowed/2docs corrected to /3.assess/3andassess_many/3docs now match their arities.Tests
trunk_evidence_test.exscovers AC-47.6.1–3: ancestor, not an ancestor, revert, re-landing, forge errors, stale assessment, and tenant isolation.chg_trunk_verification_controller_test.exscovers the HTTP shapes and the OpenAPI spec.🤖 Generated with Claude Code