fix(tri gates shell): a step whose run: key comes first is a step - #5894
Merged
Merged
Conversation
`- run: echo one` puts run: first in its list item; the census matched
trim_start().starts_with("run:") and so counted 0 steps for it, and
run_block walked up past it to the previous step's run:. New step_key
takes the list dash off and returns the key's column; shell_steps (split
from the printer, testable) and run_block both use it, so shell: and
working-directory: after a first-key run: are the step's keys, not script.
Controls: step detection reverted -> 6 shell tests red. No t27 workflow
uses the shape today, so the pinned census is unchanged.
Closes #5882
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This was referenced Oct 4, 2026
Merged
Merged
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.
Closes #5882
tri gates shellmatchedtrim_start().starts_with("run:"), so a step written- run: echo one(run: the first key of its list item) was not counted: a one-step workflow printedrun: steps 0, and the same step under- name: oneprinted 1.run_block(shared withtri gates quiet) walked up past such a key to the previous step'srun:and scoped its subject search there.cli/tri/src/gates.rs: newstep_keytakes a list-item dash off and returns the key's column.shell_stepsis split from the printer so step shapes are testable without a checkout. It usesstep_keyforrun:andshell:.run_blockmeasures the block from the key column, soshell:/working-directory:/env:after- run: |are the step's keys, not its script.- uses:items are not counted.docs/now/2026-10-04-...md: the NOW entry.Measured on 846ba27 (rebased on master c8afc32):
cargo test -- shell run_block step_key first_key quiet: 31 passedshell_stepsreverted totrim_start()-> 6 shell tests FAILED; file restored byte-identicaltri census pin --gate: the 3 pinned readings unchanged. No t27 workflow uses the- run:shape today, so nothing moves.rustfmt --check src/gates.rs: cleanNot changed: a
shell:anywhere in a job still declares every step of that job; a workflow-leveldefaults.run.shellis not read.Provenance: the owner asked for this mid-tick 21 of the queen-board loop (cron 8782e5f8). A background agent wrote it and its session ended before it committed. Tick 22 re-ran the tests, ran its own negative control, rebased and opened this PR. The agent's further controls (block measured from the dash column, first-key
- shell:reverted) are described in the NOW entry and were not re-run here.🤖 Generated with Claude Code