Skip to content

fix: reject staged artifacts at the exact temp root - #5308

Merged
Trecek merged 10 commits into
developfrom
impl-staged-temp-root-5303-20261023-195110
Oct 24, 2026
Merged

Trecek merged 10 commits into
developfrom
impl-staged-temp-root-5303-20261023-195110

Conversation

@Trecek

@Trecek Trecek commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

A staged file or symlink named exactly .autoskillit/temp could pass the pre-commit hook, despite violating the tracked-temp policy. Use Git’s pathspec to select the root and descendants, anchor the query at the repository root, and prevent submodule-ignore configuration from hiding staged gitlinks. Deletions and legitimate non-temp staging remain permitted.

Add regression coverage in the existing test module for root changes, containment boundaries, child-to-root replacement, hidden gitlinks, invocation directories, alternate indexes, and rejection through a real commit.

Validation:

  • Red checkpoint: exactly the six planned regressions failed; the other twelve tests passed.
  • Configured task test-local-gate via MCP: 15,204 passed, 197 skipped, 12 xfailed (conservative filtering, no explicit test-path scope).
  • pre-commit run --all-files passed.
  • Issue reproduction: hook_exit=1 with the refusal message naming .autoskillit/temp.

Fixes #5303.

@Trecek
Trecek added this pull request to the merge queue Oct 24, 2026
Merged via the queue into develop with commit 2ba8701 Oct 24, 2026
11 checks passed
@Trecek
Trecek deleted the impl-staged-temp-root-5303-20261023-195110 branch October 24, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant