Skip to main content

story.delivery/2

Deliver a planning-store story: implement it, verify the current implementation revision with its tests and the repository's gate, open a pull request for it, read its continuous integration, and merge it under authority. Accepted once the pull request is merged, or abandoned on an explicit decision. Every claim is about the implementation at its current revision, so a new commit returns all of them to unknown. A case fixes whether the tests must fail before the implementation is edited and whether the gate runs once, after the handover, or at every revision; the pull request opens only on a complete change, with test paths and implementation paths both changed and the tests and the gate green at one revision.

Dependency graph​

Which actions may produce which evidence, which claims that evidence establishes, and which outcomes and obligations rest on those claims. Hover or focus a node to trace what it rests on.

Protocol · revision 2

story.delivery/2

Deliver a planning-store story: implement it, verify the current implementation revision with its tests and the repository's gate, open a pull request for it, read its continuous integration, and merge it under authority. Accepted once the pull request is merged, or abandoned on an explicit decision. Every claim is about the implementation at its current revision, so a new commit returns all of them to unknown. A case fixes whether the tests must fail before the implementation is edited and whether the gate runs once, after the handover, or at every revision; the pull request opens only on a complete change, with test paths and implementation paths both changed and the tests and the gate green at one revision.

  • Actions10
  • Evidence kinds9
  • Claims9
  • Outcomes2
  • Obligations4
  • Claim supports claim
  • Precondition, traced on hover
  • Needs authority
ACTION · READchange.handoverACTION · READchange.readACTION · READci.readACTION · READgate.runACTION · WRITEimplementation.editACTION · WRITEpr.openACTION · READrepository.inspectACTION · WRITErepository.mergeACTION · READtests.runACTION · WRITEtests.writeEVIDENCE KINDchange_recordEVIDENCE KINDci_resultEVIDENCE KINDgate_resultEVIDENCE KINDhandoverEVIDENCE KINDmerge_observationEVIDENCE KINDpaths_changedEVIDENCE KINDpull_requestEVIDENCE KINDtest_resultEVIDENCE KINDtests_changeCLAIMchange.completeCLAIMchange.handed_overCLAIMchange.madeCLAIMci.greenCLAIMgate.greenCLAIMpr.mergedCLAIMpr.openedCLAIMtests.passCLAIMtests.shown_redOUTCOMEabandonedOUTCOMEacceptedOBLIGATIONci.requiredOBLIGATIONgate.requiredOBLIGATIONmerge.requiredOBLIGATIONtests.required

Hover or focus a node to trace what it rests on and what rests on it. Press Enter to pin it, Escape to clear.

Case inputs

gate_on
after_handovereach_revisionwhen the repository's gate runs; after the handover, it runs only on a revision whose tests pass and whose change is handed over, so once, on the revision that can be handed over, and at every revision it runs whenever asked
tests_first
optionalrequiredwhether the story's tests must fail before the implementation is edited; under required, the implementation is edited only while the tests, once written, fail at the current revision, or while they pass and the gate or continuous integration fails there
Protocol as text
Actions
NameDescriptionRuleLeads to
change.handoverhand the change over, changing no file, once it is complete (the story's tests written and the implementation done) and no further edit is needed; takt records the choice, and the pull request is opened for this revision and its continuous integration read onceclaim is unknown: change.handed_over effect readproduces handover
change.readread whether merging the implementation revision into the base branch's tip would change its tree outside .engineering/, and which paths it changes; taken once the change is handed overclaim change.handed_over effect readproduces change_record; produces paths_changed
ci.readread the continuous integration result for the pull request's head; needs the pull request open for the implementation revisionclaim pr.opened effect readproduces ci_result
gate.runrun the repository's gate against an implementation revision; when the case runs the gate after the handover, needs the tests passing and the change handed over at the revisionany of all of claim change.handed_over claim tests.pass input gate_on in each_revision effect readproduces gate_result
implementation.editchange the implementation in the repository's working revision; when the case requires its tests first, needs the story's tests written and failing at the current revision, or written, seen failing in a run at the revision of their latest write and observed after it, and passing at the current one with the gate or continuous integration failed there, so a failure no test reads (formatting, lint, another platform) can be fixedany of all of any of claim is false: ci.green claim is false: gate.green claim tests.pass evidence = fail: test_result since tests_change about implementation claim tests.shown_red input tests_first in optional effect write—
pr.openpush the implementation revision, with the commits that record its approval above it when there are any, and open its pull request through the run's forge; needs the tests and the gate green, the change handed over at the revision, a merge of it into the base branch's tip that would change the tip outside .engineering/, so nothing is opened at the seed or for content the base already has, and the change complete, so it opens once, on a revision with both test paths and implementation paths changedall of claim change.complete claim change.handed_over claim change.made claim gate.green claim tests.pass effect writeproduces pull_request
repository.inspectread the repositoryeffect read—
repository.mergemerge the pull request into the repository's mainline; needs continuous integration green, the pull request open and authority to merge, never only a connection to the repository hostall of claim ci.green claim pr.opened needs repository.merge effect writeproduces merge_observation
tests.runrun the tests against an implementation revisioneffect readproduces test_result
tests.writechange the tests in the repository's working revisioneffect writeproduces tests_change
Evidence kinds
NameDescriptionRuleLeads to
change_recordwhether merging an implementation revision into the base branch's tip would change that tip's tree outside .engineering/; its result is ahead or none—establishes change.made (ahead about implementation)
ci_resultthe result of continuous integration on an implementation revision; its result is pass or fail—establishes ci.green (pass about implementation)
gate_resultthe result of the repository's gate against an implementation revision; its result is pass or fail—establishes gate.green (pass about implementation)
handoverthe harness chose to hand the change over at this implementation revision, with no file changed: takt records the choice from the step, as it records a request for an approval. The record attests a choice, not that the change is correct: the tests, the gate and continuous integration stay validator evidence; it has no result—establishes change.handed_over (about implementation)
merge_observationthe observation that the pull request whose head is an implementation revision, or that revision with only the commits that record its approval above it, was merged; its result is merged—establishes pr.merged (merged about implementation)
paths_changedwhich paths an implementation revision changes since the base branch's tip: test paths, implementation paths, both or neither; its result is tests_only, implementation_only, both or none—establishes change.complete (both about implementation)
pull_requesta pull request whose head is an implementation revision, or that revision with only the commits that record its approval above it; its result is open—establishes pr.opened (open about implementation)
test_resultthe result of running tests against an implementation revision; its result is pass or fail—establishes tests.pass (pass about implementation)
tests_changethe record that the story's tests were written, moving the implementation to a new revision; it has no result—establishes tests.shown_red (not first none about implementation)
Claims
NameDescriptionRuleLeads to
change.completethe current implementation revision changes both test paths and implementation paths since the base, and its tests pass and its gate is green at that same revisionall of claim gate.green claim tests.pass evidence = both: paths_changedgates pr.open
change.handed_overthe harness handed the change over at the current implementation revision, saying it is complete; a new commit returns it to unknownany evidence: handovergates change.handover (unknown); gates change.read; gates gate.run; gates pr.open
change.mademerging the current implementation revision into the base branch's tip would change its tree outside .engineering/: there is a change to publishevidence = ahead: change_recordgates pr.open
ci.greencontinuous integration passes for the current implementation revisionevidence = pass: ci_resultrequires ci.required; gates implementation.edit (false); gates repository.merge
gate.greenthe repository's gate is green for the current implementation revisionevidence = pass: gate_resultsupports change.complete; requires gate.required; gates implementation.edit (false); gates pr.open
pr.mergedthe pull request for the current implementation revision is mergedevidence = merged: merge_observationrequires accepted; requires merge.required
pr.openeda pull request is open for the current implementation revisionevidence = open: pull_requestgates ci.read; gates repository.merge
tests.passthe tests pass for the current implementation revisionevidence = pass: test_resultsupports change.complete; supports tests.shown_red (false); requires tests.required; gates gate.run; gates implementation.edit; gates pr.open
tests.shown_redthe story's tests were written, and they fail at the current implementation revision; a run about an earlier revision, and a run before the tests were written, say nothing, and an edit that moves the implementation to a new revision returns the claim to unknown until the tests are run there. The order form over tests_change with a result no such record has reads whether any tests_change was recorded, at any revisionall of claim is false: tests.pass not first evidence = none: tests_change about implementationgates implementation.edit
Outcomes
NameDescriptionRuleLeads to
abandonedthe story closed because it was explicitly abandoned——
acceptedthe story closed with its pull request mergedclaim pr.merged—
Obligations
NameDescriptionRuleLeads to
ci.requiredcontinuous integration passes for the current implementation revisionclaim ci.green—
gate.requiredthe repository's gate is green for the current implementation revisionclaim gate.green—
merge.requiredthe pull request for the current implementation revision is mergedclaim pr.merged—
tests.requiredthe tests pass for the current implementation revisionclaim tests.pass—

Source: protocols/story-delivery/2.yaml

Actions​

What can be done in a case: what it needs first, which authority it requires, the class of effect it has and the evidence it may produce.

ActionDescriptionPreconditionRequires capabilityEffectMay produce
change.handoverhand the change over, changing no file, once it is complete (the story's tests written and the implementation done) and no further edit is needed; takt records the choice, and the pull request is opened for this revision and its continuous integration read oncechange.handed_over is UNKNOWNno authorityreadhandover
change.readread whether merging the implementation revision into the base branch's tip would change its tree outside .engineering/, and which paths it changes; taken once the change is handed overchange.handed_over is TRUEno authorityreadchange_record, paths_changed
ci.readread the continuous integration result for the pull request's head; needs the pull request open for the implementation revisionpr.opened is TRUEno authorityreadci_result
gate.runrun the repository's gate against an implementation revision; when the case runs the gate after the handover, needs the tests passing and the change handed over at the revisionany of (all of (change.handed_over is TRUE; tests.pass is TRUE); input gate_on is one of each_revision)no authorityreadgate_result
implementation.editchange the implementation in the repository's working revision; when the case requires its tests first, needs the story's tests written and failing at the current revision, or written, seen failing in a run at the revision of their latest write and observed after it, and passing at the current one with the gate or continuous integration failed there, so a failure no test reads (formatting, lint, another platform) can be fixedany of (all of (any of (ci.green is FALSE; gate.green is FALSE); tests.pass is TRUE; a test_result with result fail since the latest tests_change, at its revision, both about implementation); tests.shown_red is TRUE; input tests_first is one of optional)no authoritywriteno evidence
pr.openpush the implementation revision, with the commits that record its approval above it when there are any, and open its pull request through the run's forge; needs the tests and the gate green, the change handed over at the revision, a merge of it into the base branch's tip that would change the tip outside .engineering/, so nothing is opened at the seed or for content the base already has, and the change complete, so it opens once, on a revision with both test paths and implementation paths changedall of (change.complete is TRUE; change.handed_over is TRUE; change.made is TRUE; gate.green is TRUE; tests.pass is TRUE)no authoritywritepull_request
repository.inspectread the repositorynoneno authorityreadno evidence
repository.mergemerge the pull request into the repository's mainline; needs continuous integration green, the pull request open and authority to merge, never only a connection to the repository hostall of (ci.green is TRUE; pr.opened is TRUE)repository.mergewritemerge_observation
tests.runrun the tests against an implementation revisionnoneno authorityreadtest_result
tests.writechange the tests in the repository's working revisionnoneno authoritywritetests_change

Evidence kinds​

The kinds of evidence this protocol admits.

Evidence kindDescriptionProduced byUsed by claims
change_recordwhether merging an implementation revision into the base branch's tip would change that tip's tree outside .engineering/; its result is ahead or nonechange.readchange.made
ci_resultthe result of continuous integration on an implementation revision; its result is pass or failci.readci.green
gate_resultthe result of the repository's gate against an implementation revision; its result is pass or failgate.rungate.green
handoverthe harness chose to hand the change over at this implementation revision, with no file changed: takt records the choice from the step, as it records a request for an approval. The record attests a choice, not that the change is correct: the tests, the gate and continuous integration stay validator evidence; it has no resultchange.handoverchange.handed_over
merge_observationthe observation that the pull request whose head is an implementation revision, or that revision with only the commits that record its approval above it, was merged; its result is mergedrepository.mergepr.merged
paths_changedwhich paths an implementation revision changes since the base branch's tip: test paths, implementation paths, both or neither; its result is tests_only, implementation_only, both or nonechange.readchange.complete
pull_requesta pull request whose head is an implementation revision, or that revision with only the commits that record its approval above it; its result is openpr.openpr.opened
test_resultthe result of running tests against an implementation revision; its result is pass or failtests.runtests.pass
tests_changethe record that the story's tests were written, moving the implementation to a new revision; it has no resulttests.writeno claim

Claims​

Each claim is TRUE, FALSE or UNKNOWN, established from evidence by its predicate. Missing or stale evidence leaves a claim UNKNOWN, never FALSE.

ClaimDescriptionTrue when
change.completethe current implementation revision changes both test paths and implementation paths since the base, and its tests pass and its gate is green at that same revisionall of (gate.green is TRUE; tests.pass is TRUE; evidence paths_changed with result both about implementation)
change.handed_overthe harness handed the change over at the current implementation revision, saying it is complete; a new commit returns it to unknownevidence handover about implementation
change.mademerging the current implementation revision into the base branch's tip would change its tree outside .engineering/: there is a change to publishevidence change_record with result ahead about implementation
ci.greencontinuous integration passes for the current implementation revisionevidence ci_result with result pass about implementation
gate.greenthe repository's gate is green for the current implementation revisionevidence gate_result with result pass about implementation
pr.mergedthe pull request for the current implementation revision is mergedevidence merge_observation with result merged about implementation
pr.openeda pull request is open for the current implementation revisionevidence pull_request with result open about implementation
tests.passthe tests pass for the current implementation revisionevidence test_result with result pass about implementation
tests.shown_redthe story's tests were written, and they fail at the current implementation revision; a run about an earlier revision, and a run before the tests were written, say nothing, and an edit that moves the implementation to a new revision returns the claim to unknown until the tests are run there. The order form over tests_change with a result no such record has reads whether any tests_change was recorded, at any revisionall of (tests.pass is FALSE; not (the first tests_change about implementation is none))

Obligations​

What must be done before a case can be complete, and what discharges it. An obligation stays open until its predicate is TRUE; its predicate being UNKNOWN does not discharge it.

ObligationDescriptionDischarged when
ci.requiredcontinuous integration passes for the current implementation revisionci.green is TRUE
gate.requiredthe repository's gate is green for the current implementation revisiongate.green is TRUE
merge.requiredthe pull request for the current implementation revision is mergedpr.merged is TRUE
tests.requiredthe tests pass for the current implementation revisiontests.pass is TRUE

Outcomes​

The legitimate terminal interpretations of a case, and what each requires.

OutcomeDescriptionRequires
abandonedthe story closed because it was explicitly abandoneddecision explicitly_abandoned
acceptedthe story closed with its pull request mergedpr.merged is TRUE

Artifacts​

The things whose revisions evidence is bound to.

ArtifactDescription
implementationa revision of the code that realizes the plan
intentwhat the story is meant to achieve
planthe intended steps toward the intent

Case inputs​

What a case fixes when it opens: each input takes one of the values listed, and is never UNKNOWN.

InputDescriptionValues
gate_onwhen the repository's gate runs; after the handover, it runs only on a revision whose tests pass and whose change is handed over, so once, on the revision that can be handed over, and at every revision it runs whenever askedafter_handover, each_revision
tests_firstwhether the story's tests must fail before the implementation is edited; under required, the implementation is edited only while the tests, once written, fail at the current revision, or while they pass and the gate or continuous integration fails thereoptional, required