Skip to content

Reject invalid repository skill parent links before Codex launch - #1578

Merged
mergify[bot] merged 9 commits into
mainfrom
lean178/1479-skill-parent-links
Nov 26, 2026
Merged

mergify[bot] merged 9 commits into
mainfrom
lean178/1479-skill-parent-links

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Reject invalid repository skill parent links before Codex launch

Context and goal

Closes #1479

Acceptance

  • Both parent directories reject dangling and looping links before even the Codex version probe.
  • Retain existing skill-root, traversal, and argv behavior.
  • Extend the existing parametrized link test with no net test-line increase.

Validation

Recorded for a817d44d5a7b

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

On #1432's head 062029e, all four added cases fail at the Codex version probe. With this change, 13 focused Codex skill and launch tests pass. The test file shrinks by one line. This uses the same path validation and pre-launch failure boundary as #1432.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, a817d44, approve

eowca and others added 9 commits November 26, 2026 00:55
…ewers

The Codex reviewer now launches with project_doc_max_bytes=0, so the
reviewed head's AGENTS.md and AGENTS.override.md are not loaded, and with
a skills.config entry disabling every skill under the checkout's
.agents/skills and .codex/skills. The PR controls both surfaces; they
now reach the reviewer only as evidence. ARCHITECTURE.md and CONTRACT.md
state which instruction surfaces each reviewer loads.

Closes #1107

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A skill directory under the reviewed checkout that links outside it is
now rejected before anything behind the link is scanned, and a disable
list too large for one process argument fails as a runner error, so
neither can leave a PR-selected skill enabled or crash the launch.

Refs #1107

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository skill list is now computed before the Codex version and
help probes run, and any error while listing skills, including symlink
loops and paths that cannot be encoded as UTF-8, fails the attempt as a
runner error so the next reviewer family is tried.

Refs #1107

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A looping or dangling link at or under either skill root now fails the
Codex attempt instead of being skipped, a symlinked SKILL.md is disabled
by its target, and a DEL character in a skill path is escaped so the
skills.config override stays valid TOML.

Refs #1107

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Architecture-Review: unchanged; the existing pre-launch checkout containment rule now also covers the parent directories.
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the merge retains the landed review policy and validates the skill parent paths at the existing pre-launch boundary.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on a817d44d5a7b1ef85c1ae791d837fb94f1714b34, 26.8s: approve (0 critical, 0 important, 1 suggestion)

Same-family fallback: every configured family contributed (claude, codex). Cross-family review is preferred.

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Findings without a file location:

  • suggestion: Parent-level containment is new but untested — _repository_skill_paths now resolves .agents and .codex strictly and checks they stay inside the checkout (runners.py:529-531) before it descends into skills. As a result, .agents -> /outside now fails even when the outside directory has no skills child. Before this change it was rejected only if /outside/skills existed. The task names this containment as a goal, but test_codex_skill_links_leaving_the_checkout_fail_before_scan_or_launch only covers .codex/skills/host and .agents/skills, so nothing pins the new boundary. Add ".agents" (or ".codex") to that parametrize list. It fits on the existing line, so the test file still has no net line increase, and it checks the error is raised before any scan or Codex call.

Native Claude output is retained in the restricted local review receipt.

@eowca
eowca marked this pull request as ready for review November 26, 2026 07:24
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 9bd1514 at 07:33 UTC

9 min in the queue, 3 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 07:24 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1636
  • ✅ Merged 07:33 · 9bd1514 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 9bd1514 into main Nov 26, 2026
18 checks passed
@eowca
eowca deleted the lean178/1479-skill-parent-links branch November 26, 2026 07:34
@mergify mergify Bot removed the queued label Nov 26, 2026
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.

security: Fail closed when .agents or .codex itself is a dangling or looping link

1 participant