Repository navigation
feat(bin): support named crew and integration branches - #6251
lakshyads05 wants to merge 40 commits into
Conversation
|
910326a to
6ccc9af
Compare
Bare repositories and office work that ships against a named feature branch need a full crew branch and an integration branch through launch, PR target, review, and landing.
…ests/fm-named-branches.test.sh. Targeted test, bash syntax check, and diff validation pass; shellcheck reports only the existing SC1091 info for tests/lib.sh
A scout with no recorded base can take its integration branch at promotion, crew-branch reservations cover every clone of one origin, and a local landing note stays visible beside other completion text.
A completed row keeps its landing note only when the final body line is the recorded local branch, so an earlier line such as local office stays prose.
6ccc9af to
7234424
Compare
| def local_note($rest): | ||
| cap(($rest | strip_trailing_metadata); ".*(?:^|[[:space:]]+-[[:space:]]+|[[:space:]])(?<v>local main)$"); | ||
| def local_note($body): | ||
| cap($body; "^(?:local[[:space:]]+|Deliverable of the finished work: (?:.*; )?local[[:space:]]+)(?<v>[^[:space:]]+)[[:space:]]+<!-- fm-local-landing -->$") |
There was a problem hiding this comment.
Completed local-only rows written before the new marker have an unmarked local <branch> body line. This parser no longer recognizes those lines, so their landing artifact disappears from Recently Landed even though the backlog entries have not changed. That makes older landings harder to identify in the fleet view.
…dded executable coverage for SSH, SCP-style SSH, and HTTPS reservation equivalence plus shared lock identity. Verified focused suites, ShellCheck, syntax, and diff checks pass
|
@kunchenguid please approve workflows |
|
@kunchenguid this PR is ready and waiting for the workflow approvals. |
|
Superseded by #6442, a fresh minimal implementation of named base branches. |
Intent
Captain explicitly requests fixing the current conflict and all current Greptile findings on #6251. Do not merge.
Current forge reality: the PR targets main, head is 6ccc9af8665ce7850c8da78ea2fa751a2c4f8f53, and it is CONFLICTING/DIRTY with main.
What Changed
Risk Assessment
Testing
Validated named branch lifecycle, adversarial local-note projection, and backlog/session replay. No linters, formatters, or full repository suite were run.
bash tests/fm-named-branches.test.shEvidence: Fleet snapshot validation
Source: Fleet snapshot validation
Evidence: Backlog atomicity validation
Source: Backlog atomicity validation
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
tests/fm-backlog-atomicity.test.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Review** - 1 issue found → auto-fixed (10) ✅
bin/fm-fleet-snapshot.sh:462- The criterion requires “Keep genuine local-only landing evidence while rejecting ordinary prose.” Any completed row whose final body line is exactlylocal <branch>is still projected as a landing note (bin/fm-fleet-snapshot.sh:462-463,538-540), so ordinary proselocal officewith no merge reaches Recently Landed viabin/fm-landed-lib.sh:65-69. The regression only rejects prose when another line follows it (tests/fm-fleet-snapshot-view.test.sh:591-593). Decide whether to add an unambiguous marker/metadata or explicitly authorize this final-line convention as containment.🔧 Fix applied.
1 warning still open:
bin/fm-teardown.sh:1636- When no base_branch is recorded, teardown hardcodeslanding=mainat this changed site, butfm-merge-local.shselects the repository default (includingmasteror origin/HEAD). A local-only task on such a repository is merged into the real default while its backlog artifact is recorded aslocal main, so fleet projections report the wrong landing branch. Uselanding_branchfor both paths; its sibling selector is at bin/fm-teardown.sh:1350-1359.🔧 Fix applied.
1 warning still open:
tests/fm-named-branches.test.sh:49- The new named-branch suite proves several behaviors only by grepping generated natural-language briefs/instructions, which can pass even if runtime launch, review, or landing behavior is broken. Refine or remove these source-content-only assertions at tests/fm-named-branches.test.sh:47-52,58,65-73,98-100,237-240,317-318,333-334; assert observable metadata, refs, or command outcomes instead.🔧 Fix applied.
1 error still open:
bin/fm-dod-lib.sh:387- The required criterion says that when--base-branchis omitted, the integration branch remains the repository default, but the generated local-only contract hardcodeslocal mainandrebase onto mainat this changed site. On a master-only repository, runtime landing resolvesmasterwhile the worker is instructed to use nonexistentmain. The same default-main wording remains at bin/fm-dod-lib.sh:147 and bin/fm-dod-lib.sh:173. Derive the omitted-base wording from the actual repository default, or confirm thatmainis an intentional constraint.🔧 Fix applied.
1 error still open:
bin/fm-promote.sh:523- The prior rollback fix still leaves a commit handoff race. Iffm_backlog_atomic_transition publishsucceeds atbin/fm-promote.sh:517and the process is interrupted beforePROMOTION_COMMITTED=1atbin/fm-promote.sh:523, the EXIT cleanup atbin/fm-promote.sh:190-196removes the valid ship instructions and restores the scout brief while metadata already recordskind=ship. Make cleanup derive commit state from the atomically published metadata or otherwise close this transition boundary.🔧 Fix applied.
1 error still open:
bin/fm-dod-lib.sh:173- The omitted-base local-only contract still tells the worker to merge into localmainat this changed block. On a master-only project, runtime landing resolves tomaster, so the worker is instructed to use a nonexistent branch. Keep omitted-base behavior aligned with the repository default; the sibling diagnostic at bin/fm-dod-lib.sh:147 must also avoid naming the wrong landing branch.🔧 Fix applied.
1 warning still open:
docs/captain-hold-lifecycle.md:395- The documentation says a genuine landing note is any final body linelocal <branch>(docs/captain-hold-lifecycle.md:394-395), but the projection now requires the<!-- fm-local-landing -->marker (bin/fm-fleet-snapshot.sh:462-464). Following the documentedtasks-axi done --note "local office"procedure therefore silently omits genuine landing evidence. Document the required marker and updated parsing contract.🔧 Fix applied.
1 error still open:
bin/fm-fleet-snapshot.sh:463- The prior local-landing-marker fix still drops genuine evidence through the captain-hold retention path. A held local-only task passes the marked note at bin/fm-teardown.sh:1632-1634; bin/fm-backlog-transition-lib.sh:573-575 wraps it asDeliverable of the finished work: local office <!-- fm-local-landing -->at bin/fm-backlog-transition-lib.sh:626-632. After the captain answers, bin/fm-fleet-snapshot.sh:535-541 examines only the final body line, while bin/fm-fleet-snapshot.sh:462-464 requires it to start withlocal, solocal_notebecomes null and Recently Landed omits the completed landing. This contradicts the required intent to keep genuine local-only landing evidence while rejecting ordinary prose. Update the shared retention/projection contract so the marked retained deliverable is recognized without accepting unmarked prose.🔧 Fix applied.
2 errors still open:
bin/fm-fleet-snapshot.sh:463- The prior local-landing-marker fix still drops genuine evidence through the captain-hold retention path. A held local-only task passes the marked note at bin/fm-teardown.sh:1632-1634; bin/fm-backlog-transition-lib.sh:573-575 wraps it asDeliverable of the finished work: local office <!-- fm-local-landing -->at bin/fm-backlog-transition-lib.sh:626-632. After the captain answers, bin/fm-fleet-snapshot.sh:535-541 examines only the final body line, while bin/fm-fleet-snapshot.sh:462-464 requires it to start withlocal, solocal_notebecomes null and Recently Landed omits the completed landing. This contradicts the required intent to keep genuine local-only landing evidence while rejecting ordinary prose. Update the shared retention/projection contract so the marked retained deliverable is recognized without accepting unmarked prose.bin/fm-fleet-snapshot.sh:536- The round-8 fix only recognizes the marked retained form, but the projection still sets local_note to null whenever a completed body contains a captain resolution record (lines 535-539). A held local-only task can retainDeliverable of the finished work: local office <!-- fm-local-landing -->via bin/fm-backlog-transition-lib.sh:573-632; answering it prepends the resolution at bin/fm-captain-hold.sh:913-929, after which fleet projection drops the genuine marked landing. This contradicts the required criterion to keep genuine local-only landing evidence while rejecting ordinary prose. The new fixtures at tests/fm-fleet-snapshot-view.test.sh:591-594 omit the resolution record and do not cover this path; docs/captain-hold-lifecycle.md:396 codifies the conflicting suppression. Preserve an explicitly marked retained line while continuing to ignore unmarked decision prose.🔧 Fix applied.
1 error still open:
bin/fm-merge-local.sh:90- The new shared project-lock acquisition can deadlock lifecycle operations because lock order is reversed.bin/fm-merge-local.sh:73acquires the task control lock and then waits for the project lock at:90;bin/fm-promote.sh:226does the same before:371. A concurrent teardown can acquire the project lock atbin/fm-teardown.sh:431-439, then wait for the task control lock at:494, leaving both commands blocked indefinitely. Use one lock order across merge, promotion, and teardown.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-named-branches.test.shbash tests/fm-named-branches.test.shbash tests/fm-fleet-snapshot-view.test.shbash tests/fm-backlog-atomicity.test.sh✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.