Repository navigation
Propose harden-path-escape-helpers-against-symlink-loops: a symlink loop is dropped, never a traceback, in all three path-escape helpers - #1083
Conversation
…oop is dropped, never a traceback Lane: openxfactory-5 (openXfactory-5) PACKET ONLY. No byte of any script, test or workflow moves, no file under openspec/specs/ is touched, and no symlink is added to the tracked tree. `pathlib.Path.resolve(strict=True)` signals a symlink loop as a RuntimeError, which is a subclass of neither OSError nor ValueError, on the interpreter the required check pins (python-version: "3.12"; measuring shell Python 3.12.3), at the candidate's leaf and at any parent component alike. Four path-containment guards in three modules absorb only OSError (one absorbs OSError and ValueError) and so traceback where their own docstrings promise a DROP: scripts/code_surface.py:777 (_unescaped), scripts/target_release.py:630 (_unescaped) and :394 (_registry_present), scripts/proposal-support.py:347 (_contained). Driven end to end on a minimal tree carrying a committed-shape loop, validate-code-surface.py and validate-target-release.py both end in a traceback, and so do former_identity_claimants and declared_former_ids_in_tree, the two public readers the archive gate's former-identity arm is built on. Two `## ADDED` requirements over release-realization, ten scenarios, no MODIFIED block: the guard answers every resolution failure and raises none, and the symlink-loop proof is built at test time and never committed. Both titles are novel across openspec/specs/, every active delta and the archive, so sequenced_after: [] is a corroborated root claim. This packet corrects #1074's own text: _registry_present is NOT exposed when the repository root sits behind a loop either, is_dir() answering False rather than raising so the function returns at target_release.py:390. No tree state reaches that clause; design.md D3 gives the three reasons it is widened anyway. Ratification is Brett Heap's word and tasks.md section 1 is not ticked here. code_surface is non-empty, so the packet archives on merged-plus-green realization evidence and not on landing. Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 13 hours and 58 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideThis packet-only PR proposes two release-realization requirements to harden path-containment guards against symlink-loop RuntimeErrors and require test-time loop proofs; it records measurements, scope, governance, and future realization tasks while deliberately making no production-code or test changes. Sequence diagram for test-time symlink-loop proofsequenceDiagram
participant Test
participant Guard
participant Pathlib
participant Result
Test->>Test: Build a -> b -> a under tmp_path
Test->>Guard: Resolve candidate at leaf or parent loop
Guard->>Pathlib: Path.resolve(strict=True)
Pathlib-->>Guard: RuntimeError
Guard-->>Result: Negative answer
Result-->>Test: Fails before fix, passes after widening
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
The claimed ledger update is absent, and planned tests omit the explicitly required scanned-root loop case.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This packet proposes hardening OpenSpec path-containment guards against symlink-loop resolution failures without changing implementation code yet.
Changes:
- Adds two
release-realizationrequirements covering resolution failures and test-time loop fixtures. - Documents measured behavior, affected guards, realization tasks, and lifecycle metadata.
- Adds the draft change to the README active-change index.
File summaries
| File | Description |
|---|---|
README.md |
Active-change record for the proposal |
proposal.md |
Scope, rationale, and decisions |
design.md |
Measurements and design alternatives |
tasks.md |
Ratification, realization, and verification tasks |
specs/release-realization/spec.md |
New requirements and scenarios |
.openspec.yaml |
Draft origin and related records |
Review details
Suppressed comments (2)
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:113
- The requirement explicitly includes a loop in the scanned root (spec.md:109-112), but the
_unescapedtest is again limited to the leaf and parent positions. Add the root-loop case so the target-release guard's required behavior is actually covered; keep the separate clause seam for_registry_presentas planned.
- [ ] 3.4 `tests/target_release/`: one test for `_unescaped` in both positions, as
3.2; and one for `_registry_present` DECLARED AS A TEST OF THE CLAUSE
(`design.md` D3, D0.5), since no tree state reaches it, with the declaration
in the test's own docstring and not only in this packet.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:120
- The requirement explicitly includes a loop in the scanned root (spec.md:109-112), but this shared
contained_dir/contained_filetest plan covers only leaf and parent positions. Add a root-loop case for both public helpers; otherwise the root-resolution failure remains unproved.
- [ ] 3.6 `tests/proposal-support/`: one test that builds the loop under `tmp_path`
and asserts `contained_dir` and `contained_file` return `False`, in both
positions.
- Files reviewed: 6/6 changed files
- Comments generated: 7
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Lane: openxfactory-5 (openXfactory-5) `python3 scripts/validate-sequenced-after.py . --seed-ledger --moved-by '#1083'`, run after the pull request existed, the number being unknowable in the first commit. Exactly ONE row moved: harden-path-escape-helpers-against-symlink-loops {state: active, class: sole, declares: [], depth: 0}. No other row's provenance moved and no MOVEMENT LOG entry is owed, the row diff stating everything. `class: sole` CORROBORATES the root claim: no other change in the corpus writes either of this delta's two ADDED requirement titles. Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The packet has unresolved test-matrix/count inconsistencies and an incomplete OSError-family inventory.
Review details
Suppressed comments (8)
Previously missed (4) — in code that hasn't changed since the last review.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/design.md:220
- D5 repeats the two-position test matrix, but the ADDED requirement also has a distinct scanned-root loop scenario. A test plan that covers only the leaf and an intermediate parent cannot demonstrate that
root.resolve(strict=True)failures are converted to the negative answer; include the root position here and in the corresponding tasks.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:2 - This realization inventory conflicts with the packet's own task list: §3.4 calls for two target_release tests (one for
_unescapedand one clause-level test for_registry_present), so the plan has four test units across three modules, while this line says three. The tasks also require five docstrings (3.1, both in 3.3, and both wrappers in 3.5), not three; for_contained, the documented set must include the retainedValueErroras well asOSErrorandRuntimeError. Please align this summary with the executable tasks before ratification.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:133 - §3.4 requires one
_unescapedtest and a separate clause test for_registry_presentin addition to the code_surface and proposal-support tests, which is four test units. The verification step still says there are only three new tests, so its required failing/passing evidence is inconsistent with the realization tasks; update the count or explicitly combine those target_release cases.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:140 - Design D0.3 shows two constructed trees: one with the
proposal.mdloop and one with the.openspec.yamlloop;contained_change_dir_namesis an additional call on the latter, not a third tree. Calling for “three end-to-end trees” makes the verification obligation ambiguous; either change this to two or add the missing tree and its expected result to D0.3.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:105
- The ADDED requirement has a separate scanned-root scenario, but this task only requires leaf and intermediate-parent loop cases. A loop in
repo_rootmakes the root resolution fail just like the candidate/parent cases, so the realization plan currently does not cover one of the required positions; add an explicit root-position assertion and mirror it in 3.4 and 3.6.
- [ ] 3.2 `tests/code_surface/`: one test that builds an `a -> b -> a` loop under
`tmp_path`, in BOTH exposed positions (the candidate's own leaf, and a
parent component above an ordinary leaf), and asserts `_unescaped` returns
`None`. Recorded failing against `c6997f12`'s clause.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/design.md:184
- The exhaustive D4 inventory misses the current
scripts/proposal-support.py:3724clause (except (SupportError, tarfile.TarError, OSError)). That makes “TEN” and the listed locations false, so the scope audit does not actually enumerate every non-containment OSError-family catch as claimed; include:3724and correct the count to eleven.
The three modules carry TEN other `except OSError`-family clauses
(`code_surface.py:568`, `:656`; `target_release.py:337`, `:528`;
`proposal-support.py:162`, `:416`, `:2541`, `:4290`, `:4312`, `:4511`). Every one
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:154
- This “does not touch” inventory repeats the D4 omission:
scripts/proposal-support.py:3724is another non-containment OSError-family clause, even though it is a tuple catch. Add it here as well so the packet's stated scope is consistent with the source it claims to have enumerated.
- **It does not touch the other `except OSError:` clauses in these modules.**
`code_surface.py:568`, `:656`, `target_release.py:337`, `:528` and
`proposal-support.py:162`, `:416`, `:2541`, `:4290`, `:4312`, `:4511` guard
reads, writes and subprocess calls rather than containment resolutions;
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:166
- This task inherits the same incorrect total from D4: the non-containment list contains eleven OSError-family clauses once
proposal-support.py:3724is included, not ten. Update the successor count after correcting the D4/proposal inventories so the task does not claim a different audit result.
- [ ] 6.1 **The other ten `except OSError`-family clauses in these three modules**
(`design.md` D4) guard reads, writes and subprocesses. They are read,
enumerated and deliberately left, and widening them is refused rather than
deferred: absorbing a `RuntimeError` out of a YAML load or a subprocess
helper would swallow a defect in this repository's own code.
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Lite
Lane: openxfactory-5 (openXfactory-5) Copilot's review on PR #1083 opened seven threads. Six are TRUE, verified against the tree at 3756d31 and fixed here in the smallest edit that keeps the packet's meaning. The seventh is refused, measured rather than argued. D4'S INVENTORY WAS SHORT BY ONE, and an AST scan of the three modules now sets the count rather than a hand list. `scripts/proposal-support.py:3724` (`except (SupportError, tarfile.TarError, OSError)`, the support-archive read inside `verify_archive`) is an eleventh `except OSError`-family clause and was missing from all three copies of the list. TEN becomes ELEVEN in `design.md` D4, in `proposal.md` § *What this packet does NOT do*, and in `tasks.md` 3.8 and 6.1. It is a READ like the other ten, so the containment- ROLE boundary D4 recommends is unchanged; only the enumeration was wrong. The scan also found `proposal-support.py:3939`'s entrypoint `except Exception:`, which is deliberately OUTSIDE that count because it is already WIDER than the obligation, the shape the first requirement's fourth paragraph RETAINS. It is named in all four places so the next counter does not report it as a twelfth. THE SCANNED-ROOT POSITION HAD NO PLANNED PROOF. `spec.md`'s third scenario reaches a loop at the scanned root, and `tasks.md` § 3 planned tests for two positions only. Measured at `c6997f12` on `Python 3.12.3` with the root set to an `a -> b -> a` loop: `code_surface._unescaped`, `target_release. _unescaped`, `contained_file` and `contained_dir` all RAISE `RuntimeError`, and `_registry_present` returns `False` at its `is_dir()` pre-check exactly as in the other positions, so that guard is D3's one case and not a fourth. For `_contained` the position is reachable even when the CANDIDATE resolves cleanly, that guard resolving the root separately for its `relative_to` comparison; the transcript is now in `design.md` D5 and tasks 3.2, 3.4 and 3.6 each plan all three positions. TWO CLAIMS THIS PACKET MADE ABOUT ITSELF WERE WRONG. The README bullet said four guards traceback and listed `_registry_present` among them, five lines above its own paragraph recording that no tree state reaches that guard: it now reads THREE OF THE FOUR and names the pre-check. `tasks.md` § 6.3 said the four guards share one exception tuple, which § 3.5 contradicts by keeping `_contained`'s `ValueError`: it now says what is actually shared, the `RuntimeError` coverage, three clauses reading `(OSError, RuntimeError)` and one `(OSError, ValueError, RuntimeError)`. REFUSED, ONE: that `tests/sequenced_after/corpus-ledger.yaml` carries no row for this change and task 2.9 is therefore ticked over a stale ledger. The row has been at `corpus-ledger.yaml:247` since 3756d31, the current head, seeded by the sanctioned tool with its PR provenance: `{state: active, class: sole, declares: [], depth: 0, prose: false, moved_by: "#1083", moved_on: "2026-09-17"}`. `--ledger-diff` reads `per-change sweep ledger consistent with the corpus (217 rows)`. The comment's `original_commit_id` is 41fe2dc, the commit BEFORE the ledger was seeded. NO SPEC DELTA BYTE MOVES. The `## ADDED` block, its two requirements and its ten scenarios are untouched; no `## MODIFIED` block is introduced and no promoted byte is edited. `code_surface:` and `target_release:` front-matter are unchanged. Gates at this head, in a fresh clone: openspec validate <change> --strict -> valid openspec validate --all --strict -> 108 passed, 2 failed (add-chain-attestation, add-composed-view-authoring; both pre-existing) validate-code-surface.py . -> 48 active, 0 outside the grammar validate-scope-globs.py . -> passed validate-target-release.py . -> passed validate-sequenced-after.py . --ledger-diff -> consistent (217 rows) proposal-support.py . verify <change> -> ok pytest tests/{sequenced_after,code_surface,target_release,scope_globs} -q -> 634 passed in 53.55s Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Deferred unchecked tasks would block the governed archive, and the realization plan contains unresolved test-count and root-resolution inconsistencies.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:175
- The three successor boxes in §6 remain literal
- [ ], but the archive wrapper rejects anytasks.mdmatching^- \[ \](scripts/proposal-support.py:4594-4610). That makes the later §5.2 archive task impossible even though these items are explicitly “not work owed”; mark 6.1–6.3 with the repository's deferred[~]marker rather than leaving them as incomplete work.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:2 - The realization inventory says “THREE TESTS” and “THREE DOCSTRINGS,” but §3 schedules four distinct guard-test obligations (the target-release test covers both
_unescapedand_registry_present) and five documentation edits (including bothcontained_dirandcontained_file). Please align this summary and the verification wording so the second target-release guard and one of the proposal-support wrappers cannot be omitted.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:141 4.1repeats the ambiguous three-test total even though §3.2, §3.4, and §3.6 name four guard-test obligations. Recording only three failing runs could omit_registry_present's required clause proof; state the verification requirement in terms of every §3 test obligation or list all four cases.
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Lite
Lane: openxfactory-5 (openXfactory-5) Copilot's second round on PR #1083 opened two threads at 6fb46d6. Both are taken. THE ROOT-POSITION CLAIM 6fb46d6 ADDED WAS ITSELF WRONG, and this is the finding worth having. Task 3.2 said `_unescaped` at the scanned-root position "resolves BOTH sides and it is the root side that fails". It does not. `_unescaped` builds `candidate = repo_root / relative` and resolves the CANDIDATE first, so a loop at the root is traversed by the candidate and the first resolution raises; the root resolution on the NEXT line is never executed. Measured at `c6997f12` on `Python 3.12.3` by reading the raising frame rather than the outcome: code_surface._unescaped(LOOP, 'x.md') -> RuntimeError at code_surface.py:775 `candidate.resolve(strict=True)` target_release._unescaped(LOOP, 'x.md') -> RuntimeError at target_release.py:628 `candidate.resolve(strict=True)` target_release._registry_present(LOOP) -> returned False, at the `is_dir()` pre-check contained_file(LOOP, LOOP/'x.md') -> RuntimeError at proposal-support.py:343 `path.resolve(strict=True)` contained_file(LOOP, real/'x.md') -> RuntimeError at proposal-support.py:346 `relative_to(root.resolve(...))` contained_dir(LOOP, real) -> RuntimeError at proposal-support.py:346 `relative_to(root.resolve(...))` So the third position is TWO shapes and not one. For both `_unescaped`s it is a candidate path whose failing component is the root, and the test must be written that way. `_contained` is the ONE guard of the four whose root read is reachable on its own, because it resolves the candidate first and the root separately inside `relative_to`: with a real path as the candidate, `:343` succeeds and `:346` raises. That clean-candidate sub-case is now claimed in task 3.6 and nowhere else, and `design.md` D5 carries the transcript with the raising line beside each call, which is what would have caught the error the first time. Nothing about the requirement moves. `spec.md`'s third scenario says the guard MUST still answer when the root is behind a loop; which of its two resolutions raises is an implementation fact the TEST PLAN must state correctly, not an obligation. The spec delta is untouched. README: "THREE OF THE FOUR traceback" becomes "THREE OF THE FOUR END IN A TRACEBACK", matching the noun phrasing the same bullet uses four lines later. Copilot's stated diagnosis does not hold (`traceback` was the verb, carried from the pre-round text, and the "a traceback" it quotes was not in the flagged sentence); the phrasing is taken for consistency, not for a grammar error. Gates at this head, in a fresh clone: openspec validate <change> --strict -> valid openspec validate --all --strict -> 108 passed, 2 failed (add-chain-attestation, add-composed-view-authoring; both pre-existing) validate-code-surface.py . -> passed, 0 outside the grammar validate-scope-globs.py . -> passed validate-target-release.py . -> passed validate-sequenced-after.py . --ledger-diff -> consistent (217 rows) proposal-support.py . verify <change> -> ok pytest tests/{sequenced_after,code_surface,target_release,scope_globs} -q -> 634 passed in 68.70s Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The realization counts and verification plan contain unresolved inconsistencies across the packet artifacts.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/design.md:227
- “Each test” is too broad here: tasks.md §3.4 explicitly requires
_registry_presentto be proved as an exception-clause test because no tree state reaches that clause, so it cannot build a loop in these three positions. Scope this sentence to the tree-based guard tests (or explicitly exclude the clause test) to keep D5 consistent with the unreachable-guard proof rule and the task plan.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:2 - The realization inventory is internally inconsistent: this line promises THREE TESTS and THREE DOCSTRINGS, but tasks.md §3.4 requires separate
_unescapedand_registry_presenttests intarget_release(four test cases across the three modules), while §3.1, §3.3, and §3.5 require five docstring edits (including bothcontained_dirandcontained_file). The later verification text also says only three new tests. Reconcile these counts across the proposal and task list so the realization cannot be considered complete while required proof or documentation edits are omitted.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:152 - This verification task refers to “the three end-to-end trees,” but design.md D0.3 defines only two tree fixtures: the
proposal.mdloop tree and the same tree with the loop moved to.openspec.yaml;contained_change_dir_namesis an additional reader/result on the latter, not a third tree. Correct the count or add a distinct third fixture so the required verification runs are unambiguous.
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Lite
…ink-loops Lane: openxfactory-5 (openXfactory-5) main moved seven commits (c6997f1 -> 74647df) while this packet was in review, and the pull request went CONFLICTING. The visible symptom was the one this estate has seen before: on head 7fa90ad only `merge-master-approval` and the Copilot review reported, and every required gate stayed undispatched. That is a CONFLICTING pull request and not an Actions outage; Actions was dispatching normally for other heads in the same minutes. At 6fb46d6, the last head to get a full dispatch, every gate including `pytest-suite` completed SUCCESS. ONE CONFLICT, AND IT IS THE ADDITIVE ONE THE LANE PROTOCOL NAMES: README's *OpenSpec Records -> Active changes* block, where both sides inserted a new bullet at the top. BOTH ARE KEPT and nothing is rewritten. The block stays newest-first: harden-path-escape-helpers-against-symlink-loops (2026-09-17, this lane), then add-per-tenant-app-manifest-provisioning (2026-09-16, lane openxfactory-4), then adopt-entry-grain-dispositions-form (2026-09-15). Not one byte of lane openxfactory-4's bullet is touched. `tests/sequenced_after/corpus-ledger.yaml` auto-merged and is CHECKED rather than trusted: `--ledger-diff` reads consistent at 218 rows, main's 217 plus this packet's one. This packet's own files do not move in this merge. The spec delta is untouched, and no `## MODIFIED` block is introduced. Gates re-run on the MERGED tree, not carried from before it: openspec validate <change> --strict -> valid openspec validate --all --strict -> 109 passed, 2 failed (add-chain-attestation, add-composed-view-authoring; both pre-existing) validate-code-surface.py . -> 49 active, 0 outside the grammar validate-scope-globs.py . -> passed validate-target-release.py . -> passed validate-sequenced-after.py . --ledger-diff -> consistent (218 rows) proposal-support.py . verify <change> -> ok pytest tests/{sequenced_after,code_surface,target_release,scope_globs} -q -> 634 passed in 73.25s Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The packet has inconsistent realization counts, an inaccurate end-to-end verification task, and duplicated reachability claims that contradict the measurements.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 5
- Review effort level: Lite
…ainst-symlink-loops Conflict in README.md's OpenSpec Records active block only, and it was an add/add at one position: this branch's harden-path-escape-helpers bullet against main's add-citation-remainder-report and repromote-engineering-vocabulary bullets. Both sides kept, ours first on its later filing date, main's two in main's own order. tests/sequenced_after/corpus-ledger.yaml auto-merged with every side's row intact (this packet's row, plus main's two new rows and its gate-code-surface-declarations archive flip). Lane: openxfactory-5 (openXfactory-5) Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The realization inventory and verification plan contain unresolved test, docstring, and fixture-count inconsistencies.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:2
- The realization inventory says this later PR adds three docstrings, but §§ 3.1, 3.3, and 3.5 require five documentation edits:
code_surface._unescaped, bothtarget_releaseguards, and bothcontained_dir/contained_filewrappers. This undercounts the realization scope; reconcile the inventory with the task list before ratification.
code_surface: openxFactory (and NOT ONE BYTE OF IT MOVES IN THIS PULL REQUEST). The realization this packet proposes is a LATER pull request in this same repository, authored after ratification, and it is FOUR CLAUSES IN THREE MODULES plus THREE TESTS plus THREE DOCSTRINGS. The clauses, at the lines they carry on `c6997f12`: `scripts/code_surface.py:777` (`_unescaped`, `except OSError:` widened to `except (OSError, RuntimeError):`); `scripts/target_release.py:630` (`_unescaped`, the same widening) and `scripts/target_release.py:394` (`_registry_present`, the same widening); `scripts/proposal-support.py:347` (`_contained`, `except (OSError, ValueError):` widened to `except (OSError, ValueError, RuntimeError):`, the `ValueError` guarding a DIFFERENT operation's failure and STAYING). The tests, one per module, each FAILING against the unfixed clause and each building its symlink loop at test time under `tmp_path`: `tests/code_surface/`, `tests/target_release/`, `tests/proposal-support/`. The docstrings: each guard's prose amended to name `RuntimeError` beside `OSError`, which is also what keeps `code_surface._unescaped`'s written claim that `target_release._unescaped` "is the exact shape this mirrors" TRUE. NO OTHER FILE IS EDITED: no validator arm moves, no existing test is edited, renamed, flipped or deleted, no workflow changes (the required `pytest-suite` already runs `tests/`), no contract member, no schema, no report field and no promoted byte; and NO SYMLINK IS ADDED TO THIS REPOSITORY'S TRACKED TREE, which is a requirement of this packet and not merely its practice. THIS pull request carries the PACKET ONLY: `proposal.md`, `design.md`, `tasks.md`, `.openspec.yaml`, one `## ADDED` spec delta, one README *Active changes* bullet, and the machine-seeded per-change sweep-ledger row in `tests/sequenced_after/corpus-ledger.yaml` that any filing owes.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:119
- §3.4 plans two target-release tests—one for
_unescapedand another for_registry_present—while the front matter and §4.1 count three total tests/one per module. Because the registry proof is a separate clause-level check, the number of test cases and failing runs is ambiguous; reconcile the count and evidence requirement.
- [ ] 3.4 `tests/target_release/`: one test for `_unescaped` in all three
positions, as 3.2; and one for `_registry_present` DECLARED AS A TEST OF THE
CLAUSE (`design.md` D3, D0.5), since no tree state reaches it, with the
declaration in the test's own docstring and not only in this packet. The
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:154
- D0.3 contains two tree fixtures: the
proposal.mdloop and the.openspec.yamlloop (the latter drives two readers). §4.3 says "three end-to-end trees of D0.3", so the verification task names a fixture that does not exist. Change the count or enumerate the third tree.
- [ ] 4.3 The three end-to-end trees of `design.md` D0.3 re-run against the
realization head: each now REPORTS rather than tracebacks, and the reported
judgment is the drop each guard's docstring promises.
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Lite
… is four test cases, not three Copilot's five round-two threads are ONE factual point and ONE count, and both are taken. THE FACT, RE-MEASURED RATHER THAN CONCEDED. `target_release._registry_present` does not reach its `except OSError:` for any tree state. Measured at this head on Python 3.12.3 in all three positions the first requirement names, not only the one #1074 raised: a loop AT the registry leaf `contracts/releases`, a loop at the ANCESTOR `contracts/` above an ordinary leaf, and `repo_root` itself a loop. `False` in every one, `os.stat` reporting the loop as `OSError(ELOOP)` and `Path.is_dir()` absorbing it at the pre-check on :390. And the pre-check PASSING is itself the proof the clause is race-only: if `is_dir()` answered True, `stat` has just resolved every component of that path, so `resolve(strict=True)` on :392 cannot meet a loop on it either. Only a tree that CHANGES between the two reads puts one inside the clause. Two controls are recorded beside the three positions so the result reads as a mechanism and not a coincidence: `resolve(strict=True)` on the identical loop RAISES RuntimeError, and a registry that is a real directory with the loop below it returns True. So the overbroad sentence is corrected wherever it was written: three of the four clauses are DRIVEN to the failure by a COMMITTED tree shape, the fourth is a CLAUSE-LEVEL, RACE-ONLY case. `proposal.md` says it in prose and in a new fifth table column that states it per row; `.openspec.yaml`'s machine-readable origin reason says it with the three positions and the race; `design.md` D0.5 carries the measurement table and the two controls; `tasks.md` 2.5 carries the conclusion. THE COUNTS NOW AGREE, AND THE ONES THAT DISAGREED WERE BOTH UNDERCOUNTS. FOUR test cases in THREE packages, one per clause: one in `tests/code_surface/`, TWO in `tests/target_release/` (3.4's `_unescaped` case and its `_registry_present` CLAUSE test), one in `tests/proposal-support/`. FIVE docstrings, not four and not three, because `_contained` carries none of its own and the prose that states its contract lives on `contained_dir` and `contained_file`, the two public wrappers it serves. Both counts are now identical in `proposal.md`'s `code_surface:` front matter, `tasks.md` 3.4 and 4.1, and `design.md` D5. AND THE END-TO-END EVIDENCE IS TWO TREES, NOT THREE. D0.3 drives FOUR entry points to a traceback across two trees, and a FIFTH that does not traceback: `contained_change_dir_names` returns {'a-real-change'} without reaching the loop. That is a CORRECT answer today, so 4.3 now re-runs it beside the four and requires the SAME set rather than a drop. An unchanged result is part of the evidence and not an omission from it. D5's closing sentence said the scanned root is "D3's one case and not a fourth", which could now be misread against the four test cases. It is about POSITIONS and says so. Gates at this tree: `openspec validate <change> --strict` valid; `--all --strict` 110 passed, 2 failed, the two being add-chain-attestation and add-composed-view-authoring as on main. `validate-code-surface.py` passed, 50 active declaring, 0 outside the grammar. `validate-scope-globs.py` passed. `--ledger-diff` consistent, 220 rows. `doc-health --family modified-block-currency` 0 critical, 0 error, 0 warning, 16 info, all class=contested, 0 naming this packet, 0 new regressions. Lane: openxfactory-5 (openXfactory-5) Refs #1074 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…1083 `.openspec.yaml` gains `approved_by`/`approved_on` beside the unmoved `proposed_by`/`proposed_on` drafting pair, recording Brett Heap's 2026-09-18 terminal ruling "Ratify; land when green" (OQ-1 = (a), the recommended option; no GitHub comment carries the word). `proposal.md`, `design.md` and `tasks.md` flip `Status: draft` -> `Status: ratified`, gain a citation line each, and a `## Rulings` section / D1-D4 RULED markers / `tasks.md` § 1 ticks record what the word reaches and what it does not (realization and archive stay open, separate acts on separate words). `review/ratification-2026-09-18.md` is the full record; the README *Active changes* bullet is reworded from draft to ratified. Two Copilot review threads on PR #1083: - `.openspec.yaml:8` (comment 4045670977): refused. `yaml.safe_load` parses the file without error; `origin.proposed_by` as parsed is 140 characters and contains neither `": "` nor `"D1:"` (verified in this clone). The claim that PyYAML rejects the file is false. - `tasks.md:202/211/217` (comment 4045671029): fixed. § 6.1-6.3 take the house's reserved deferred marker `- [~]` instead of `- [ ]`, matching `archive/2026-09-09-add-openspec-cli-pin` and `archive/2026-09-10-accept-sequenced-after-header-line`, so `archive_change()`'s incomplete-tasks refusal does not block this packet's eventual archive. Refs #1074 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The task heading contradicts the ratified state, and the PR description disagrees with the packet’s approval status and realization scope.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
`tasks.md` § 1's heading still read "(OPEN; Brett Heap's act)" although
1.1 and 1.2 are both ticked and the packet, README and ratification
record all say the change is ratified — a lifecycle contradiction
Copilot flagged (comment 4046202981). Reworded to the closed form the
house's ratified precedents use: `openspec/changes/archive/2026-09-15-add-declared-former-id/tasks.md`
("## 1. Ratification — GIVEN 2026-09-13, Brett Heap's and nobody else's")
and `openspec/changes/add-target-release-deferred-allocation/tasks.md`
§ 1, mirrored here with the 2026-09-18 date.
Checked every other section heading for the same class of staleness:
§ 2 is already "(CLOSED in this pull request)"; §§ 3, 4 and 5 correctly
stay "(OPEN; ...)" since realization, verification and archive are
still owed on later words; § 6 correctly stays "(OPEN; successors, not
work owed)" since it names deliberately-refused work, not ratification
status. None of those needed a change.
Refs #1074
Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Two ratified lifecycle headers use the invalid Ratified by: <person> form, and the review record contains a non-portable worktree path.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/review/ratification-2026-09-18.md:105
- This commits a machine-specific worktree path and then claims that every path in the record is repo-relative. The repository constitution requires repo-relative paths or runtime resolution (
.specify/memory/constitution.md:72-73); remove the host-dependent clone path or replace it with a repo-relative locator so the record remains portable and internally consistent.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/design.md:5 Ratified by:is not valid for an operator name here.docs/document-lifecycle.md:66-70reserves that spelling for an approving change id and explicitly says that putting an approver/date after it does not satisfy the citation, so thisStatus: ratifiedheader remains invalid; use theRatified:form used byproposal.md.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:5Ratified by:is not valid for an operator name here.docs/document-lifecycle.md:66-70reserves that spelling for an approving change id and explicitly says that putting an approver/date after it does not satisfy the citation, so thisStatus: ratifiedheader remains invalid; use theRatified:form used byproposal.md.
- Files reviewed: 8/8 changed files
- Comments generated: 0 new
- Review effort level: Lite
…tory-inventory THE WORD. Brett Heap, 2026-09-18 at approximately 12:55Z, verbatim "ratify #1101", given in the lane's terminal to lane `openxfactory-5` (session `651195c7`, workstation Eagle). NO GITHUB COMMENT CARRIES IT: the channel is the terminal, not a review thread, and the lane recorded it as a RULED entry against `#1101` in `lanes/log/openXfactory-5.md`. The instant is written to the precision it was given at and no finer — inventing a minute would be inventing evidence. THE WORD IS BARE AND NAMES NO ALTERNATIVE, so each of the four decisions put at `proposal.md` § *The decision, put for a veto* takes its RECOMMENDED option, which is what that section and `tasks.md` § 1.1 both say a bare word does: D2 the inventory at `scripts/estate-repository-inventory.yaml` with `target_release: implemented`; D3 one `## MODIFIED` block; D4 five closed admission-evidence kinds and three governance classes, the inventory RECORDING an admission and PERFORMING none; D5 a former address REPORTS rather than refuses. `tasks.md` § 1.4's two review-forced disclosures — the widened `gitlink` kind and the bounded reverse arm — are taken with the rest, § 1.4 having declared them part of what the packet says and not a fifth decision. THE WORD TOOK THE OPTION THIS PACKET HAD ALREADY ENCODED, SO THE DELTA'S WORDING STANDS UNCHANGED (the precedent is PR #887). Not one byte of `openspec/changes/add-estate-repository-inventory/specs/release-realization/spec.md` is touched by this commit: its 27 scenarios are the 27 the word was given over and the `Removed from canon by` marker keeps its three names. WHAT THIS COMMIT DOES, in the shape `add-drafted-proposal-origin` (issue #318) defined and `add-target-release-deferred-allocation` and PR #1083 carry: - `.openspec.yaml` gains `approved_by` and `approved_on` AS A PURE ADDITION BESIDE AN UNTOUCHED ORIGIN BLOCK. `git diff --numstat` on that file is `50 0` — fifty additions, ZERO deletions — so `kind`, `id`, `reason`, `proposed_by` and `proposed_on` are byte-identical, its now-superseded "NO APPROVAL PAIR IS DECLARED AND NONE IS IMPLIED" sentence included. That sentence is read AS OF ITS DRAFTING, which is the same treatment the canonical precedent gives its own `<n>` placeholder, and `approved_by` says so rather than leaving a reader to work it out. - `proposal.md`, `design.md` and `tasks.md` take `Status: ratified` with ONE citation line each naming the word, the instant, the channel and the record. - `tasks.md` § 1 becomes "GIVEN 2026-09-18, Brett Heap's and nobody else's". 1.1 is ticked with the word quoted; 1.2 is SATISFIED BY THE WORD ITSELF, which reaches § 3 and not § 5; 1.3 is NOT TRIGGERED, D2 not having been vetoed; 1.4 is TAKEN WITH THE REST. §§ 3, 4, 5 and 6 stay OPEN — all eighteen of their tasks unticked. - The README *Active changes* bullet no longer says DRAFT, HELD or awaiting anything, which is the drift openxFactory issue #1093 was raised for, and states the bare word and its consequence instead. - `proposal.md`'s "NO RATIFYING WORD HAS BEEN GIVEN" and `tasks.md`'s "§ 1 is Brett Heap's act and no lane ticks it" are corrected, both being statements of fact the word falsified. NO MERGE WORD IS QUOTED HERE. The verbatim word is "ratify #1101" and nothing further; the register entry's trailing clause ("then land the packet PR on a green gate") is the LANE'S READING of it and not more words of Brett Heap's. The merge is a separate act by whoever holds it, never this lane alone, and NOTHING IS PROMOTED, REALIZED OR ARCHIVED by this commit: no file under `openspec/specs/` is edited, and `code_surface` being non-empty the archive is a separate act on merged-plus-green realization evidence and a separate word, where openxFactory #1087 closes. GATES, re-run at this tree after the encoding: `openspec validate add-estate-repository-inventory --strict` valid; `openspec validate --all --strict` 110 passed, 1 failed, the failure `add-chain-attestation` and inherited (origin/main reports the same one at 109 passed, 1 failed); `proposal-support.py . verify add-estate-repository-inventory` ok; `validate-sequenced-after.py . --ledger-diff` consistent with the corpus, 220 rows; `validate-code-surface.py .` passed; `pytest tests/sequenced_after tests/doc-health/test_modified_block_currency_self_gate.py` 3 failed, 302 passed, all three inherited from main's undispositioned `archive-date-vs-commit: 2026-09-16-add-composed-view-authoring`; `doc-health.py --single-repo .` 31 critical, 6 error, 28 warning, 23 info — finding-for-finding identical to origin/main in the same clone, 0 new and 0 gone. Refs #1087 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
…und 2) Copilot's review 5247834359 on this head surfaced three previously suppressed comments, all confirmed true: - `design.md:4` and `tasks.md:4` used `Ratified by: Brett Heap, 2026-09-18, ...`, but `docs/document-lifecycle.md:66-70` reserves `Ratified by:` for naming an APPROVING OPENSPEC CHANGE, and says explicitly that naming an approver and a date after it instead does not satisfy the citation. No approving change exists to name here — this is an in-session terminal ruling — so the record-citing `Ratified:` form is the one that applies, the form `proposal.md` already used. Reworded both headers to `Ratified: 2026-09-18, approximately 09:55Z by Brett Heap (openxFactory repository owner) — verbatim ...`, matching `proposal.md` exactly. - `review/ratification-2026-09-18.md:104` committed the host-absolute clone path `~/projects/xFactory/lane-tools-openxfactory-5/clone-1083` while the same paragraph's own next sentence claimed "every path in this file is repo-relative" — a self-contradiction, and a violation of the constitution's "Committed files MUST NOT contain host-absolute paths" (`.specify/memory/constitution.md:72-73`). Removed the clone path; the provenance sentence still names the ratification commit and the lane. Re-verified: `grep -rn '~/|/home/|/root/|/Users/'` over the packet directory now returns nothing, and all four documents (`proposal.md`, `design.md`, `tasks.md`, `review/ratification-2026-09-18.md`) read the identical `Ratified: 2026-09-18, approximately 09:55Z by Brett Heap (openxFactory repository owner)` line. `openspec validate ... --strict` and `proposal-support.py . verify` both still pass at this head. Refs #1074 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Lane: openxfactory-5 (openXfactory-5) Handling review 5247834359 (commit All three confirmed TRUE and fixed at commit
Re-verified: |
There was a problem hiding this comment.
🔵 Needs a closer look
Several packet summaries incorrectly claim every affected guard has its own docstring, although _contained is documented through public wrappers.
Review details
Suppressed comments (4)
Previously missed (4) — in code that hasn't changed since the last review.
README.md:561
- This README says the three traceback sites are covered by “their own docstrings,” but
_containedatscripts/proposal-support.py:341has no docstring; its contract is documented by thecontained_dir/contained_filewrappers instead, as the proposal’s front matter also notes. Use “documented contracts” here or name those wrappers so this summary does not contradict the packet’s own docstring count.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/.openspec.yaml:7 - The machine-readable origin reason repeats “each guard's own docstring,” but
_containedatscripts/proposal-support.py:341has no docstring; the contract is on its two public wrappers. This leaves the persisted provenance explanation inconsistent with the packet’s explicit five-docstring count; change the phrase to refer to the guards’ documented contracts or the wrapper documentation.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/proposal.md:88 - The proposal repeats the claim that each affected guard has its own docstring, but
_containedhas no docstring; its negative-answer contract is oncontained_dirandcontained_file(the front matter explicitly counts those five docstrings). This should say “documented contract” or identify the public wrappers to keep the rationale internally consistent.
openspec/changes/harden-path-escape-helpers-against-symlink-loops/tasks.md:194 - The verification task again attributes the promised drop to each guard’s docstring, but
_containedhas no docstring; onlycontained_dirandcontained_filedocument that contract. Refer to each guard’s documented contract (or explicitly include the public wrappers) so the realization checklist matches the packet’s stated five-docstring count.
- Files reviewed: 8/8 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
|
Lane: openxfactory-5 (openXfactory-5) Pre-existing red, dispositioned. This head's
all on |
|
Lane: openxfactory-5 (openXfactory-5) LANDING — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-18T14:03:23Z, PR #1083 into opensoft/openxFactory main |
|
Lane: openxfactory-5 (openXfactory-5) LANDED — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-18T14:03:42Z, PR #1083 into opensoft/openxFactory main → merge ebcdbc0; Propose harden-path-escape-helpers-against-symlink-loops: a symlink loop is dropped, never a traceback, in all three path-escape helpers |
The pull request was CONFLICTING with main, which is why no `pull_request`-triggered check ran on 55a0794: only `merge-master-approval` (`pull_request_target`) and the Copilot reviewer fired, the signature of a conflicting head rather than a CI outage. ONE conflict, in the README `## OpenSpec Records` *Active changes* block — this packet's bullet against `harden-path-escape-helpers-against-\ symlink-loops`, landed on main at `ebcdbc0c` (PR #1083) while this branch was open. RESOLVED BY KEEPING BOTH, in the block's own newest-first order: `amend-code-surface-grammar-comma-and` (filed 2026-09-18) above `harden-path-escape-helpers-against-symlink-loops` (filed 2026-09-17), above `add-citation-remainder-report` (2026-09-16). No byte of either bullet is edited. `tests/sequenced_after/corpus-ledger.yaml` auto-merged: main's new rows beside this branch's two seeded ones. Re-checked rather than assumed — `python3 scripts/validate-sequenced-after.py . --ledger-diff` reports `per-change sweep ledger consistent with the corpus (221 rows)` on the merged tree, with 43 changes declaring and 19 explicit `[]` root claims. Main also carries `dc242f3a`, which retires the stale `add-composed-view-authoring` archive-date disposition — the inherited `tests/sequenced_after` red this branch has been naming rather than dispositioning since it opened. Refs #1092 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
Lane: openxfactory-2 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…oops with this PR's own evidence `harden-path-escape-helpers-against-symlink-loops` § 3 and § 4, realized by this pull request (#1107, commits `17390262` the four clause widenings, `4892fa5f` the four test cases) and now on this branch after merging `origin/main` (`ebcdbc0c`, #1083's landing of the packet) in the preceding commit. § 3.1/3.3/3.5 (the three modules): DONE, cited by commit and current line number, docstring claim of identity (code_surface._unescaped mirrors target_release._unescaped; target_release._unescaped generalizes _registry_present's test) kept TRUE because all four clauses widen in one commit, per design.md D2's ruling. § 3.2/3.4/3.6 (the four test cases): DONE, cited by test id, with the fails-then-passes pair the requirement demands (RuntimeError against c6997f1's clause, PASSED against this branch's). § 3.7/3.8: PROVEN, re-run at the merged head 87eb684 — `git ls-files -s | awk '$1 == "120000"'` empty; `git diff --stat origin/main` names exactly the six files (three modules, three test files), the four deleted lines being exactly the four unwidened clauses. § 4.1/4.2: GREEN, re-run at 87eb684 — `452 passed, 297 subtests passed` (the three packages; +1 subtest is the corpus sweep now counting this packet's own directory, admitted by the merge); the three live-corpus validators all exit 0. § 4.3: PROVEN, the two design.md D0.3 trees rebuilt and the four tracebacking entry points plus the fifth (unchanged) reader re-run at 87eb684, reproducing PR #1107's own body table exactly. § 4.4: LEFT OPEN, `- [ ]`, with a dated note. pytest-suite at 87eb684 (run 35354873708, 14m9s) is red on exactly four tests, all in tests/sequenced_after/, all one finding — archive-date-disposition STALE: 2026-09-16-add-composed-view-authoring — none touching this packet's six files. Confirmed inherited and not caused here: the identical 4-failure signature reproduces on a clean worktree at plain origin/main (ebcdbc0) with no realization content at all. main is red on this today (lane openxfactory-4's 2026-09-16-add-composed-view-authoring; repair PR #1109 in flight). § 5 and § 6 untouched; `.openspec.yaml` untouched (its own tasks name no realization field to record). Validated at this head: `openspec validate harden-path-escape-helpers-against-symlink-loops --strict` passes; `--all --strict` 109/110 pass (the one failure, add-chain-attestation, is untouched by this branch and pre-existing on main); `pytest tests/code_surface tests/target_release tests/proposal-support tests/sequenced_after -q` → 4 failed (the inherited finding above), 734 passed, 297 subtests passed; `validate-code-surface.py .` and `proposal-support.py . verify harden-path-escape-helpers-against-symlink-loops` exit 0; `validate-sequenced-after.py . --ledger-diff` exit 0, ledger consistent (220 rows). Refs #1074 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
pytest-suite is GREEN at PR #1107 head 8fb0fc9, run 35359208240 (2026-09-18), confirmed by `gh run view 35359208240 --json conclusion` returning success. Appended beside the prior LEFT OPEN note (which recorded the inherited red at the earlier head 87eb684, since repaired on main) rather than replacing it, because the tick itself is the ARCHIVE act's: taken from main's own green run at the landed merge, since a tick commit always moves the head past the run it cites (the add-declared-former-id precedent). Item stays - [ ]; § 5 stays - [ ]; § 6 stays - [~]. Lane: openxfactory-5 (openXfactory-5) Refs #1074 Refs #1083 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…r containment guards answer a symlink loop (refs #1074) (#1107) Refs #1074. Refs #1083. REALIZATION of the ratified packet harden-path-escape-helpers-against-symlink-loops (proposal PR #1083 → ebcdbc0; ratified by Brett Heap 2026-09-18 "Ratify; land when green"): the four path-containment guards in scripts/code_surface.py, scripts/target_release.py and scripts/proposal-support.py catch RuntimeError beside OSError so a symlink loop is answered instead of raised; four test cases build an a -> b -> a loop under tmp_path and failed against the unfixed code; five docstrings; no symlink enters the tracked tree; the packet's tasks.md §§ 3-4 ticked with this PR's evidence and § 4.4 noted for the archive act. LANDED on Brett Heap's word of 2026-09-18 ~14:30Z, verbatim "land #1107 when it is un-drafted", un-drafted at bc9ebf9 with twelve checks green (pytest-suite run 35362604810). The archive is a separate act on a separate word. Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>
…DME entry
The archive makes this packet's per-change sweep-ledger row stale by that
ledger's own design, so it is re-seeded with the sanctioned tool and with no
hand edit:
python3 scripts/validate-sequenced-after.py . --seed-ledger --moved-by '#1116'
-> wrote tests/sequenced_after/corpus-ledger.yaml (221 rows, 1 moved by #1116)
- harden-path-escape-helpers-against-symlink-loops
Before the seed, --ledger-diff read "per-change sweep ledger STALE (4
finding(s))": this change's row plus the three derived totals it feeds (active
ledger-derived 47 != measured 46; archived 174 != 175; active_sole 20 != 19).
After: "per-change sweep ledger consistent with the corpus (221 rows)".
EXACTLY ONE ROW MOVES and no code byte moves: state active -> archived,
moved_by "#1083" -> "#1116", moved_on 2026-09-17 -> 2026-09-18. `class: sole`
is HELD -- this change writes two requirement keys novel to the whole corpus,
so no partner flips from sole to co-modifier and NO MOVEMENT LOG entry is owed.
The same commit writes PR #1116 into the README archived-ledger entry in place
of the ARCHIVE-PR-NUMBER-PENDING marker the archive commit deliberately left:
the real number does not exist until the pull request does, which is why this
is a second commit and not a hand edit to the first.
Refs #1074
Refs #1083
Refs #1107
Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…d-plus-green realization evidence (#1083 → ebcdbc0, #1107 → c22c4fc, main green at 049d54a) (#1116) Closes #1074 (the packet's § 5.3: the archive pull request closes the governing issue by a closing keyword written here and in no commit message). ARCHIVE of harden-path-escape-helpers-against-symlink-loops on merged-plus-green realization evidence: proposal PR #1083 → ebcdbc0, realization PR #1107 → c22c4fc, main pytest-suite green at 049d54a (run 35372664200). Promotes the two ADDED requirements (ten scenarios) onto release-realization; tasks.md §§ 4.4 and 5 ticked on that evidence. LANDED by MERGE COMMIT on Brett Heap's word of 2026-09-21 ~20:40Z, verbatim "archive it #1112 and #1116". Refs #1083, #1107. Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]>



Lane: openxfactory-5 (openXfactory-5)
Ratified
RATIFIED 2026-09-18 by Brett Heap (openxFactory repository owner), the
word verbatim "Ratify; land when green" — given in the lane's terminal
as a multiple-choice answer to lane
openxfactory-5(displayopenXfactory-5, session651195c7), at approximately 09:55Z. NO GITHUBCOMMENT CARRIES THIS WORD: the channel was the terminal, not a review
thread, so this body cites the record rather than a comment permalink —
openspec/changes/harden-path-escape-helpers-against-symlink-loops/review/ratification-2026-09-18.md.WHAT THE WORD RESOLVED.
proposal.md§ The decision, put for a veto(OQ-1) put
design.mdD1 through D4 as one multiple choice, recommendationfirst. The word named no alternative letter, so it is read as (a), AS
FILED, on all four: D1 two
## ADDEDrequirements overrelease-realization(against a## MODIFIEDblock over eitherrealization-axis title, against a new capability of its own); D2 one act
across all four sites in all three modules (against three riders, against
fixing only the three reachable sites); D3 widen
_registry_presenttoo anddeclare its proof a test of the CLAUSE, though no tree state reaches it
(against leaving it and naming a successor); D4 scope the obligation to the
containment ROLE (against every
except OSError:in the three modules,against naming the four clauses literally). (b), (c) and (d) were not
taken. Not one byte of
specs/release-realization/spec.mdmoved as aresult — the word ratifies the packet exactly as filed.
WHAT IS STILL OWED.
tasks.md§ 1 is ticked (1.1 the ruling itself, 1.2what it authorizes). §§ 3, 4, 5 and 6 stay entirely open: § 3 (realization)
is a LATER pull request under this lane, authored on this word but not
carried here; § 4 (verification) is taken at the realization head; § 5
(archive) is a separate act on merged-plus-green realization evidence and a
separate word —
code_surfaceis non-empty, so openxFactory#1074 stays OPEN and
closes only there; § 6 is measured-and-not-taken successor work, marked
[~]so it does not gate the eventual archive.AND THE LANDING IS A SEPARATE ACT, NOT THIS DESCRIPTION'S. "Land when
green" is a MERGE authorization over this ratification's own consequence: it
fires once this pull request's checks are green, performed by whoever holds
it. This lane refreshes the packet and does not merge it; the Rule 6 LANDING
is performed by this lane's coordinator.
What this proposes
PACKET ONLY. No byte of any script, test or workflow moves; no file under
openspec/specs/is touched; no symlink is added to the tracked tree. The diff is this packet's own directory, one README Active changes bullet, and the machine-seeded per-change sweep-ledger row.Two
## ADDEDrequirements overrelease-realization, ten scenarios, no## MODIFIEDblock:Ratified as filed. The packet authorizes ONE later realization pull request:
except (OSError, RuntimeError):at three clauses,except (OSError, ValueError, RuntimeError):at the fourth, FOUR TEST CASES IN THREE TEST PACKAGES — not one per module — each FAILING against the unfixed clause and built at test time undertmp_path(ONE intests/code_surface/for_unescaped; TWO intests/target_release/,_unescapedand_registry_presentseparately, the latter declared in its own docstring as a test of the CLAUSE since no tree state reaches it; ONE intests/proposal-support/for_contained, asserted throughcontained_dirandcontained_file), and FIVE docstrings amended to nameRuntimeErrorbesideOSError(code_surface._unescaped,target_release._unescaped,target_release._registry_present,proposal-support.contained_dir,proposal-support.contained_file— five and not four because_containedcarries no docstring of its own), which is also what keepscode_surface._unescaped's written "mirrorstarget_release._unescaped" claim TRUE.Both ADDED titles were checked against
openspec/specs/, every active change's delta and the archive and appear nowhere else, sosequenced_after: []is a corroborated root claim and no modified-block-currency row is opened.Measurement
Every line number re-read on
c6997f12in a fresh clone; every transcript re-taken there..github/workflows/pytest-suite.yml:556pinspython-version: "3.12"; the measuring shell isPython 3.12.3.The four sites, and what each promises:
scripts/code_surface.py_unescaped(:746)except OSError:(:777)None, candidate droppedscripts/target_release.py_unescaped(:600)except OSError:(:630)None, candidate droppedscripts/target_release.py_registry_present(:354)except OSError:(:394)False, registry absentscripts/proposal-support.py_contained(:341)except (OSError, ValueError):(:347)False, path uncontainedCalled directly against an
a -> b -> aloop:Driven END TO END, not inferred. A minimal tree,
openspec/changes/a-real-change/withproposal.md -> loop-bandloop-b -> proposal.md:The same tree with the loop on
.openspec.yamlinstead, driving the two public readers the archive gate's former-identity arm is built on:Two whole house validators and two archive-gate readers end in a traceback. A traceback is neither a drop nor a finding; it is the gate refusing to report on the tree at all, which is the one outcome each guard's docstring was written to prevent.
THIS PACKET CORRECTS ITS OWN ISSUE. #1074 says
_registry_presentis exposed "when the repository root itself sits behind a loop". Measured, it is not:is_dir()on<loop>/contracts/releasesanswersFalserather than raising, so the function returns attarget_release.py:390and never reaches:392. No tree state was found that drives that guard to its clause. It is widened anyway (design.mdD3): the pre-check and the resolution are two reads of a tree that can change between them; a reader of the module sees the clause and not the pre-check; and_unescaped's own docstring names this function as the test it generalizes, so leaving one of the two narrower re-opens the mirror defect INSIDE one module. Its proof is declared as a test of the CLAUSE rather than dressed as a reachable tree.Nothing in the estate tracebacks today: the live corpus tracks ZERO symlinks.
Why a packet and not a fix PR
scripts/target_release.pyrealizesgate-realization-axis-vocabulary, ARCHIVED 2026-09-12 with its requirements promoted.scripts/proposal-support.pyis the governed OpenSpec wrapper this estate's archive acts run through.scripts/code_surface.pyrealizesgate-code-surface-declarations, whose archive is still held on merged-plus-green evidence (#1076).code_surface._unescaped's docstring ends: "target_release._unescapedis the exact shape this mirrors."target_release._unescaped's opens: "THIS IS_registry_present'S TEST, GENERALIZED TO ANY PATH THIS MODULE OPENS." Those two sentences bind the four sites into one claim of identity, and widening one module alone would falsify it. This is the disposition PR #1029 recorded rather than taking the rider (comment 5703004913, corrected by 5704938369), and #1074 is the follow-up it promised.design.mdD1 records why this is an ALL-ADDED delta and not a## MODIFIEDblock: the promoted corpus carries no requirement about what this capability's readers do when a path cannot be resolved at all, so there is no current text to restate; and the two nearest titles are already written by the active ratifiedadd-target-release-deferred-allocation, so a second block over either would owesequenced_after:on it, take its pre-text from that change rather than from canon, and inherit its archive-order hold.Gates at this head
Run in a fresh clone of
origin/mainatc6997f12, on the branch head.doc-health: ZERO new findings, proved byte-for-byte rather than eyeballed. Both runs taken in the SAME clone and the same directory name (the memory of a worktree artifact in
release-inventory-driftis why),origin/mainc6997f12detached and then the branch head:Both report
Findings: 31 critical, 11 error, 40 warning, 22 info. New regressions vs previous report: 0.The twomodified-block-currencyordering warnings over Prose tagging marker hygiene stand in BOTH and are the pre-existing lane-2 / lane-4 collision, untouched by this packet: this delta carries NO## MODIFIEDblock, so it opens no row and appears in that family's output nowhere.tests/doc-health/test_modified_block_currency_self_gate.py::test_the_resolution_ordering_and_marker_classes_read_zero_over_the_real_treeFAILS at this head and fails identically onorigin/mainatc6997f12; it is the known red self-gate and is not this branch's.Head at these transcripts:
3756d317.Refs #1074
🤖 Generated with Claude Code
Summary by Sourcery
Use the ratified OpenSpec packet to coordinate a later, unified hardening of path-containment helpers against symlink-loop failures.
New Features: