Skip to content

fix(safecommit): bound and batch peer WIP reference attribution #11812

Description

@anthony-chaudhary

Observed failure

While finishing independently green Astra guard issue #11548, an exact two-file fak commit remained active for more than 15 minutes without a completion/refusal. Process readback identified repeated git log -1 --format=%B refs/fak/wip/... work. No commit success is claimed. Coordinator requested cancellation of its owned pending command; the sanctioned managed-worktree landing path will be attempted only after termination and state verification.

Code evidence

internal/safecommit/peerwip.go resolveGitPeerOwner enumerates all refs/fak/wip refs then launches per-ref log and diff-tree commands for each target path. This admits O(paths * refs) subprocess amplification. Existing lock acquisition timeout is not a whole-operation deadline.

Bounded outcome and witness

Batch/cache ownership lookup for the invocation and propagate a whole-operation context deadline. Preserve peer ownership protections and fail closed on incomplete evidence; do not skip attribution or delete refs. One deterministic fake-Runner regression with many refs must assert bounded subprocess count and cancellation; a bounded real Git fixture must exercise the same attribution path.

Tier 3 harness / Enabling. For coding agents shipping explicit-path fixes; Problem long silent finish step; Today per-path per-ref scanning; Better because bounded, witnessed attribution without weakening gates. Include scan/setup cost in efficiency claims. Search open/closed resolveGitPeerOwner and safecommit WIP refs scanning found no duplicate. Related #11308 general subprocess cancellation, #11553 Astra guard comparison. No implementation yet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

class:devWork class: product/kernel dev leaf (the default day-to-day work)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions