Repository navigation
factory: landing approve step waits for its answer; Manual hold is approve_step; removed pipeline drops its own steps - #2493
Merged
Conversation
… is its own Needs-you kind; a removed pipeline takes its own steps
An approve step that is a run's last step marked itself done on landing (local
runner) or stayed pending (worker), so publication went past a step nobody had
passed. It now lands waiting, the proof approval passes it, and an approval is
refused while any other approve step is unpassed.
Manual's hold before a step read as approve_plan ("Plan ready"). It is now
approve_step, gate step, approval kind step, and names the next step by label.
remove_pipeline left its own step definitions behind, so a later add_step of
the same name was refused as "That value is out of bounds". It now drops the
steps only it used, and the clash refusal names the step.
…s in person words After "mark it ready" the manager said merge was not offered while the job page offered Merge: the press reply never read the job again, so the model repeated its draft-era status. The mark-ready reply now re-reads the job and says what the page offers, and the page's merge block, the manager's status and its press all read factory.MergeOffered. factory_status named steps by their stored keys (followpr); it now uses the step's label, or Follow PR for the follow step.
The approve_step kind accepted a stored plan approval as the hold's own, so an earlier gate's settled consent closed a later Manual hold's Approve (TestAppFactoryApprovalSurvivesLaterGatesAndRestart). Only an open plan approval carries over; a settled step approval is an earlier hold's, as a settled plan approval already was.
…window The approval settles and write runs; the next hold, before test, reads as approve_step with an approval of kind step, never as the plan hold again.
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.
Fixes three engine findings from the live desk journey walk (NOTES.md Part 7, items 1–3).
1. An approve step at the end of a run was passed by landing (serious)
Job #176 ran planfix → writefix → runvetand → proof2 (approve step). It was held in Manual before runvetand, then switched to Auto. It published PR #179 while proof2 still read "to come".
Cause. The Auto switch passing the standing Manual ask is by design. The bug is in what happens next.
approve()ininternal/factory/run/loop.gotreated an approve step that is the run's last step as "the landing". It marked the step done itself, with no answer recorded. On a worker, which never reports approve steps (run/diff.gostepsMoved), the service kept the steppending. Either way, the proof approval then published past a step that nobody had passed.Fix.
factory.LandingGate, set inlandItem), on both the local runner and a worker report.approveStored) is what passes the step.ApprovalRefusedrefuses publication, in Auto and in Manual, while any other approve step that is switched on is unpassed:has an approve step nobody has passed yet: <step>.Judgement to check: Auto still passes a routine, non-fixed last approve step through its recorded proof approval, as
AutonomyBlockReasonand the manual already describe. A step that is fixed or names an approver still waits for that person. If a last approve step should never pass in Auto, that is a one-line change inAutonomyBlockReason. It is a policy change, so it is not made here.2. A Manual hold read as "Plan ready"
The hold was
approve_plan, gateplan, reasonapproval_plan(needs.go:260). It is now:approve_stepstep, reasonapproval_step, approval kindstep(an older storedplanapproval still counts for the hold)needs_you.stepholding the step's labelstate_presentation.detailreadingRunVetAndTest is next · waiting for you to go onSend back and Auto passing the hold work exactly as before. The desk needs to learn
approve_stepand gatestep.3. Removing a pipeline left its step definitions behind
remove_pipelinenow drops the definition of each step only that pipeline listed. It keeps any step that another pipeline lists, that thefixed:list names, or that codeaf ships. The clash refusal now names the step on the wire:There is already a step named lint-it with other words. Pick another name, or add it with the words it has.Before, it was "That value is out of bounds".Proof
run/landing_gate_test.go(3),serve/manual_steps_test.go,pipeline/edit_remove_pipeline_steps_test.go(2) andappwire/factory_pipeline_edit_clash_test.go.go test -count=1passes for factory, run, serve, lease, worker, api, pipeline and appwire.make test-lawsandgo test ./internal/manual/pass.factory.mdandfactory-stage-conversations.mdare updated.🤖 Generated with Claude Code