fix(pipeline): docs-only custody normalization + docs push coverage - #888
fix(pipeline): docs-only custody normalization + docs push coverage#888RooseveltAdvisors wants to merge 5 commits into
Conversation
Route receive-hook daemon calls through the gate-derived NM_HOME and reject notifications whose gate belongs to another daemon home. Co-authored-by: Cursor <cursoragent@cursor.com>
Confidence Score: 4/5The PR should not merge until fresh multi-commit documentation pushes ending in an empty commit are guaranteed to run the remaining validation and delivery stages. The new documentation exception depends on a branch reflog unavailable in the normal bare-gate topology, causing its HEAD-parent fallback to miss earlier documentation commits and retain the pipeline-skipping behavior this change intends to fix. Files Needing Attention: internal/pipeline/steps/rebase.go, internal/pipeline/steps/rebase_test.go, internal/e2e/docs_only_pipeline_test.go Reviews (1): Last reviewed commit: "fix(pipeline): cover multi-commit docs p..." | Re-trigger Greptile |
| entries, err := git.Run(ctx, workDir, "reflog", "show", "--format=%H", "refs/heads/"+branch) | ||
| if err == nil { | ||
| lines := strings.Fields(entries) | ||
| if len(lines) > 0 && strings.TrimSpace(lines[0]) != "" { | ||
| return strings.TrimSpace(lines[len(lines)-1]), nil | ||
| } | ||
| } | ||
| } | ||
| parent, err := git.Run(ctx, workDir, "rev-parse", head+"^") | ||
| return strings.TrimSpace(parent), err |
There was a problem hiding this comment.
When a fresh multi-commit documentation push ends in an empty commit, the detached worktree normally lacks this bare-gate branch reflog, so freshPushBase falls back to HEAD^. The resulting empty tip-only diff makes freshDocumentationPush return false and causes updateHeadSHA to skip all remaining validation and delivery stages.
Context Used: If there is a VISION.md file at the root of the re... (source)
Knowledge Base Used:
|
Speaking as Kun's firstmate: first-time fork CI is approved after reviewing the diff (no security stop). Runs 33223464446 (CI), 33223464482 (docs), 33223464498 (Require no-mistakes), 33223464670 (Guard generated files). This is a successor to closed #872, not a last-resort port. This is corrective in intent (docs-only empty-diff skip, recovered:true stuck on pipeline_owned, missing-head fresh-run dead-end, hook home binding). Not merging yet. Waiting on you, not the captain. Greptile P1 on VISION.md exists. Per-rule:
contract-class: restore. The unconfigured gate already promised that a shortcut failure falls back to the slower correct path, and that recovered custody is actually returned. Not auto-merge-ready while the P1 stands. |
Summary
recovered: truecannot leave the branch reported aspipeline_ownedand loop back torecover_custody.--recover --keep-localdoes not claim recovery or stamp custody.Live fleet evidence
On 2026-08-27 on gpu, lane
portal-agents-train-2was a fresh worktree with a fresh run whose only commit changedAGENTS.mdandCLAUDE.md. The engine reportedPASSEDwithno docs diffand skipped review, tests, lint, push, PR, and CI. A worker death left recorded pipeline headfc934137absent from both the worktree and gate; four recovery attempts remained blocked onblocked_recover_preserved_head_missing, whilesync --recover --keep-localrefused with unpublished pipeline commits preserved. Another lane reported a branch missing from the home-B mirror although it existed in home A, exposing the hook home-binding problem addressed by PR 848.Verification
go test -race ./...make lintgo build -o ./bin/no-mistakes ./cmd/no-mistakesmake e2e