Skip to content

Use a hook-safe exact-path commit primitive across OAT lifecycle flows #306

Description

@tkstang

Summary

Two exact-path OAT commit flows in the same downstream run collided with a Git index lock while repository hooks were active: an initial scaffold commit and a gate-owned project-log commit. In both cases, waiting for the lock to clear, staging the exact path, making a normal commit with hooks preserved, and replaying the idempotent recovery succeeded.

The repeated symptom is confirmed. The precise Git and hook interaction still needs an upstream reproduction.

Desired behavior

Provide one hook-safe exact-path commit primitive for OAT lifecycle flows. It must preserve unrelated staged state, keep hooks enabled, distinguish append or write success from commit-finalization success, and support idempotent recovery after interruption or transient index locking.

Acceptance criteria

  • Exact-path commits work in repositories with lint-staged or equivalent index-managing hooks.
  • Unrelated staged and unstaged changes remain unchanged.
  • Transient index locking uses bounded inspection and retry; OAT never deletes an unverified lock.
  • Exhausted retries return a structured resumable result.
  • Recovery recognizes an already-written or already-appended matching artifact without duplication.
  • Tests cover both scaffold-style commits and gate-owned project-log commits.

Related

#213 covers gate-owned project-log finalization under transient index locks. This proposal is broader because the same failure mode also affected a non-gate scaffold commit and calls for a shared commit primitive across lifecycle flows.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tracked-in-backlogAccepted and linked to an OAT file-backed backlog item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions