Repository navigation
Add a self-merge Step and tighten-only limits to a Custom process - #1431
Merged
Merged
Conversation
`**` resumed at every byte, so `**/key.txt` matched `mykey.txt`. It now resumes at the next path segment, and `?` is one character. A Ticket run and a Process share the merge-flag parse.
git diff --name-only quotes names with non-ASCII, quote, backslash or newline bytes, so a protected path such as secrets/** never matched the quoted listing and the merge went ahead. List names NUL-delimited (-z) and match on the raw bytes.
This was referenced Oct 27, 2026
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.
Summary
A
self-mergeStep directly afterdeliveryis the existing Self-merge. It merges only when the command'smergeflag or the User config'smerge_alwaysasks. Otherwise the pull request stays ready for review. A file can only tighten limits:repair_capno higher than 5,self_merge = falseto hold a merge the command asked for, andprotected_pathsglobs.*stays inside one path segment,**crosses segments, and?is one character other than/.checkprints a limit only when the file tightens one. A self-merge Step anywhere but directly after delivery is refused before a session.Evidence
mergewas not a process flag.After:
cargo test --test process— 93 passed, 1 ignored — includingself_merge_after_delivery_merges_when_asked_and_stays_ready_otherwise,self_merge_false_holds_the_merge_and_says_why,a_protected_path_holds_the_self_merge_and_names_the_path,a_quoted_protected_name_still_holds_the_self_merge,a_lower_repair_cap_stops_the_repair_loop, anda_repair_cap_above_the_effective_cap_is_a_loosening_limit. After the glob fix,cargo test --bin thirdshift protected_path_globs_match_on_segment_boundariespassed, and the protected-path process test passed again.cargo clippy --all-targets -- -D warningspassed.cd site && npm run docs:checkpassed. The quoted-name hold fix lists names withgit diff --name-only -zand matches on the raw bytes:cargo test --bin thirdshift delivery::— 69 passed — andcargo clippy --bin thirdshift --testspassed with no warnings.scripts/affected-tests issue-877ran the full suite: 3192 passed, 70 skipped.Merge Danger
Door: two-way
Revert these commits. A Process file that does not mention
self-mergeor[limits]behaves as it did. A Ticket run still passes no protected paths and the effective Repair cap.Blast Radius: processes
A Custom process that asks to merge now merges the same way a Ticket run does. A bad protected-path glob can hold that merge and leave the pull request ready for review.
Seams
thirdshift process checkand a run refuse a file whose shape loosens a limit or placesself-mergeanywhere but directly afterdelivery.thirdshift process <name> issue Nmerges when asked, holds whenself_merge = falseor a protected path matches, and stops the Repair loop at a lower cap.Unaddressed findings
Standards
Duplicated Code (judgement) —
refuse_self_mergerepeats delivery's "not optional / not parallel / Issue-branch worktree" checks.src/processes.rsaround theself-merge cannot be optionalrule. Plan: each catalogue keeps its own refusal text, asrefuse_publisheddoes. The messages differ (self-merge cannot be optionalversusdelivery cannot be optional), andrefuse_issue_branchalso finds the last editing Step. Sharing a helper would only swap the rule name.Duplicated Code (judgement) —
publish_stepsandInWorktree::take_to_goalboth buildRunOutside.src/delivery.rsInWorktree::take_to_goalhardcodesprotected_paths: &[]andMAX_REPAIRS;publish_stepspasses the file's cap and globs. Plan: those are the two callers on purpose. A Ticket run stays on the open limits. A shared constructor would be another long argument list, and clippy'stoo_many_argumentslimit is 7.Glossary length (judgement) —
.agents/skills/domain-modeling/GLOSSARY-FORMAT.mdsays one or two sentences, anddocs/agents/domain.mdsays glossary definitions stay implementation-free. The added sentences are on Custom process, Self-merge, and Repair loop inGLOSSARY.md. Plan: those entries were already procedural before this change (the Self-merge entry already describes the merge commit, the observation, and deleting the branch). The new sentences state the tighten rule beside those terms.docs/code-navigation.mdholds the paths. The reviewer did not label this a hard breach.The duplicated merge-flag parse was fixed:
take_flagcallstake_merge_flag, andGoal::from_flagis what a Ticket run and a Process both use.The quoted-name hold fix raised no new Standards findings:
Git::run_bytesreusesrun's failure path, and the byte-slice change stays inside the existing private seam.Spec
None. The protected-path glob finding was fixed. The reviewer's
rustccommand, as written, stopped beforeglob_match's closing brace and did not compile. The same asserts, with that brace included, panicked on**/key.txtversusmykey.txt.delivery::tests::protected_path_globs_match_on_segment_boundariesnow locks those asserts and passed. The quoted-name hold fix is spec-clean: it performs the specified hold for quoted names and adds no new limit, flag, or Step.Security
No unaddressed introduced findings. Review found one introduced finding — the protected-path hold missed a changed name git quotes, so the Self-merge went ahead — and it is fixed on this branch:
merge_holdlists names withgit diff --name-only -zand matches on the raw bytes (src/delivery.rs,Git::run_bytesinsrc/git.rs), locked bya_quoted_protected_name_still_holds_the_self_mergeintests/process.rs. No pre-existing findings were touched; those belong to a separate Security run.Security review outcome
No unaddressed introduced findings.
Review coverage
No changed file was left unread.
site/docs/index.htmlis generated fromdocs/guide.mdbysite/generate-docs.mjs.cd site && npm run docs:checkpassed, and the new self-merge, repair-cap, and protected-path sentences are in the HTML. The reviewers did not count that file as read.Closes #1390
Built with grok grok 1.0.70 (f50904eaee6c) [stable] · default model · default effort