Attempt 11: exact consolidated rebase

Back to attempt history | Back to durable goal

Objective

Replace the nine task-owned feature commits with one aggregate commit, rebase that exact candidate onto the current remote base, preserve the incoming goal and skill-discovery layouts, and establish publish-ready evidence without bypassing repo_delivery.

Reconciliation

  • The fetched base advanced to 63e7b9f0be1e054373415914ff3d2ea2282aa3da and added the reusable projects/goal project, per-skill discovery links, decision-review, and exact-head remote-review waiting rules.
  • The old agent-local goal skill remains deleted. The durable MCP goal stays under projects/mcp_cordis/goals/runtime_extensions.
  • The branch keeps the upstream root discovery target, including decision-review and projects/goal/skills/goal, and combines the incoming review-waiting policy with the branch’s correctness-revalidation policy.

Delivery adapter corrections

The authorized consolidation path exposed four fail-closed edge cases during the real rebase:

  1. Existing PR text must match the requested aggregate projection, rather than the obsolete first commit’s projection.
  2. Explicit staging must handle deleted paths, partial directory deletions, and a tracked symlink replaced by a directory.
  3. Patch files need the standard repository-wide whitespace exceptions for structural context prefixes.
  4. A rebased aggregate path may disappear only when the prior candidate and new base contain the exact same Git tree entry. The receipt then records the reduced path set; added paths, non-identical loss, and an empty aggregate remain refusals.

Each case has focused integration coverage. Every failed preparation restored the original branch, index, and worktree before the next correction.

Exact candidate evidence

  • repo_delivery prepare --consolidate produced one commit on the fetched base. The first exact code candidate before the final adapter-and-record update was f1c313b0920cb92f2d643dcb5c7d79ab364df058.
  • Bazel query invocation 5ad9400e-f7b8-4688-9b8c-e962f3de8e66 discovered the affected MCP, delivery, and skill targets.
  • Bazel test invocation 13588b19-1f8a-43a7-8006-f9d5d4652670 passed all 12 affected tests, including Buildifier and discovery-link validation.
  • Bazel build invocation 5863ac24-3bb2-47be-99fb-50141e933018 passed all 29 affected targets.
  • The real launcher initialized, listed all ten gateway tools, and remained live while Bazel query invocation 4637f187-d05e-4905-8153-18fca8644ea1 completed. SIGINT then terminated the server as expected.
  • git diff --check passed and the worktree remained clean after validation.

Verdict

The aggregate was published as a single commit on PR 32 and its delivery receipt verified the local tree, remote feature ref, current base ancestry, and PR projection. The exact-head hosted review found three additional issues:

  • repository reads reopened a checked symlink through its lexical alias;
  • permanent /proc inspection failures could prevent shutdown from settling;
  • the process-tree timeout regression assumed Node could start within 100 ms.

The final correction reads through a canonical, no-follow file handle and verifies that handle through /proc/self/fd before consuming bytes, turns repeated process-inspection failures into a bounded EXEC_CLEANUP result, and uses a startup-safe timeout in the process-tree regression. The full MCP test and build packets pass, and both focused targets pass three repeated runs. The review threads are reconciled through the receipt-bound delivery adapter. The follow-up exact-head review found the same replaceable-path class in git_worktree: discovery verified one repository directory, but later Git commands reopened its lexical path. Git discovery and every subsequent command now use /proc/<pid>/fd/<fd> paths backed by verified open directory handles, while the subprocess working directory remains workspace-local. Focused mock coverage checks every Git -C path and the real Cordis starter package integration passes. The next pass found the same class in repo_context’s ripgrep and Git metadata branches; both now use verified descriptor paths for the complete subprocess lifetime, and directory listing uses the selected directory handle as well. Attempt 11 is accepted and the goal is complete. The terminal exact-head review then identified that the JavaScript regular-expression fallback could both block the MCP event loop on pathological backtracking and disagree with ripgrep’s Unicode semantics. The fallback now fails closed for regex requests when ripgrep is unavailable; bounded fixed-string search remains available. Focused and complete MCP test and build packets pass after that correction. The next exact-head pass found that replacement decoding of invalid UTF-8 also changed fixed-search raw byte offsets. The fallback now fails closed for such files as well, leaving raw-byte search semantics to ripgrep; the focused, complete test, and build packets again pass.