Skip to content

Archive harden-path-escape-helpers-against-symlink-loops on its merged-plus-green realization evidence (#1083 → ebcdbc0c, #1107 → c22c4fc3, main green at 049d54a9) - #1116

Merged
brettheap merged 9 commits into
mainfrom
change/archive-harden-path-escape-helpers-against-symlink-loops
Sep 23, 2026
Merged

brettheap merged 9 commits into
mainfrom
change/archive-harden-path-escape-helpers-against-symlink-loops

Conversation

@brettheap

@brettheap brettheap commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-5 (openXfactory-5)

THIS PULL REQUEST IS A DRAFT, PREPARED IN ADVANCE AND HELD. It performs the ARCHIVE ACT so that Brett Heap's archive word, when it comes, is a merge and not a night's authoring. It claims that word nowhere.

ARCHIVE ACT, prepared 2026-09-18; lands ONLY on Brett Heap's separate archive word, by MERGE COMMIT (gh pr merge --merge), never squash. A squash re-dates the archive directory's adding commit and turns main red on archive-date-vs-commit — the failure mode openxFactory #1076 and #1056 already paid for. The wrapper's act commit is what the date checker reads, so it must survive the landing.

Closes #1074

That line is the archive act that promotes the delta, and the origin issue shuts with it. It is the ONLY place in this pull request where a closing keyword is intended; every other issue and pull-request number below — #1083, #1107, #1112, #1114, #1029, #1076, #899 — is a Refs-style naming and shuts nothing, and no commit message on this branch or on the realization branch carries a closing keyword beside an issue number, checked with a grep over origin/main..HEAD rather than assumed (transcript below). This is the exception tasks.md § 5.3 authorizes by name, which requires the keyword in the ARCHIVE pull request "and in no commit message on this branch or the realization branch"; it is not this lane's general Refs-only practice being relaxed.

What this archives

openspec/changes/harden-path-escape-helpers-against-symlink-loops/, filed 2026-09-17 by lane openxfactory-5 in answer to openxFactory #1074, RATIFIED 2026-09-18 at approximately 09:55Z by Brett Heap (openxFactory repository owner), verbatim "Ratify; land when green" — given in the lane's terminal as a multiple-choice answer, so NO GITHUB COMMENT CARRIES THE WORD and review/ratification-2026-09-18.md is how it survives. Ratifying commit ebcdbc0c20eb.

Its code_surface: is openxFactory, NON-EMPTY, so under release-realization it archives on MERGED-PLUS-GREEN realization evidence and on a separate archive word — never on landing and never on ratification.

Evidence

half value state
Packet landing PR #1083 → merge ebcdbc0c20eb7368582d4bb8103001ab48316542 on main, 2026-09-18T14:03:33Z (Brett Heap "Ratify; land when green" ~09:55Z, "land #1083" ~14:20Z) IN HAND
Realization merge PR #1107 → merge c22c4fc355898d4e57eb1159f47d756b30875b66 on main, 2026-09-18T17:06:27Z, from head bc9ebf95 (Brett Heap "land #1107 when it is un-drafted" ~14:30Z) IN HAND
Green at the realization head pytest-suite run 35362604810 at bc9ebf95 → success; whole check set at that head 15 SUCCESS / 1 SKIPPED (Sourcery review), 0 failures, 14 distinct names IN HAND
Green on main pytest-suite run 35372664200 at 049d54a9e4d51fe2e1c0a8c97c1e22c5d2f3e694 → success, 2026-09-18T17:09:27Z IN HAND
main's green tree CONTAINS the realization merge gh api repos/opensoft/openxFactory/compare/c22c4fc3...049d54a9 --jq .status → ahead MEASURED
Brett Heap's separate ARCHIVE word not given OWED

THE THREE COMMITS ARE ONE ANCESTRY CHAIN, CHECKED LEG BY LEG — ebcdbc0c (#1083) → c22c4fc3 (#1107) → 049d54a9 (the tree main's green run decided) — each leg with git merge-base --is-ancestor, each exiting 0. This branch's base e3647b6d is the CURRENT origin/main and contains all three; it was not cut from an older tip, because archive-date-vs-commit is history-sensitive.

ONE SHA IN THE PACKET IS CORRECTED RATHER THAN LEFT TO BE FOUND. tasks.md § 4.4's own earlier note named head 8fb0fc99 (run 35359208240, green). That was this branch's head when the note was written; ONE commit followed — bc9ebf95, the note's own commit — and bc9ebf95 is the head #1107 merged from. Both heads have a green pytest-suite, so no conclusion moves; the sha does.

What moved

Commit 1 — 59071f89, the ticks. They precede the move because scripts/proposal-support.py's archive_change() refuses any literal - [ ] line in tasks.md and there is no bypass flag (#899 and #1076 took the same order).

box tick what it records
§ 4.4 green in hand pytest-suite GREEN on main at 049d54a9 (run 35372664200, 2026-09-18T17:09Z), containing the realization merge c22c4fc3 (#1107); green at bc9ebf95 too (run 35362604810); and the 8fb0fc99 correction above
§ 5.1 evidence half MET the two merges and main's green run, each cited. The OPERATOR half — Brett Heap's archive word — is NOT claimed and is not in this lane's gift
§ 5.2 promoted + archived BY THIS PULL REQUEST: the wrapper command, its decisive output, the archive directory name, the two promoted requirements with their byte counts and hashes
§ 5.3 closing keyword PLACED Closes #1074 is in THIS body and nowhere else; the grep over both branches' commit messages returns 0. The tick records that the instrument is in place, never that the issue is shut
§ 6.1–6.3 untouched - [~] documented successors and refused-not-owed work, not incomplete work; the house marker exists exactly so they do not gate an archive

It also adds review/verification-2026-09-18-post-merge.md (Status: record, Kind: report), the packet's first and only verification capture. There was no earlier review/verification-*.md to re-run — §§ 4.1–4.3's measurements were taken inside #1107 and written into tasks.md — so it claims no Rerun of: and supersedes nothing.

Commit 2 — 6fdbaafb, the archive act. Through the GOVERNED WRAPPER, never a bare openspec archive (§ 5.2 forbids the bare invocation):

$ TZ=UTC python3 scripts/proposal-support.py . archive \
      harden-path-escape-helpers-against-symlink-loops --yes
ORIGIN RETAINED harden-path-escape-helpers-against-symlink-loops (declaration unchanged since the ratifying commit ebcdbc0c20eb)
proposal-support: @fission-ai/[email protected] from the pinned artifact (…); integrity sha512-oFE2Lj7WVSc87nSi… verified, over the pinned dependency closure openspec-cli-pin.1.12.0.package-lock.json (80 packages, lockfile_integrity sha512-aw5lIN45tQq2WZll…, installed with `npm ci --ignore-scripts`)
Totals: 1 passed, 0 failed (1 items)
Task status: ✓ Complete
Specs to update:
  release-realization: update
Applying changes to openspec/specs/release-realization/spec.md:
  + 2 added
Totals: + 2, ~ 0, - 0, → 0
Specs updated successfully.
Change 'harden-path-escape-helpers-against-symlink-loops' archived as '2026-09-18-harden-path-escape-helpers-against-symlink-loops'.
OK openspec-cli-pin: @fission-ai/[email protected] verified against its content address and every target validated --strict clean
NO SUPPORTING DOCS …/openspec/changes/harden-path-escape-helpers-against-symlink-loops (origin retained, nothing to package)

Exit 0. The CLI is the content-addressed @fission-ai/[email protected] pin, not the 1.13.1 on PATH; --path-mode was not used. --date was not passed, so the wrapper took today in UTC, 2026-09-18, which is also the UTC day of the act commit — the identity archive-date-vs-commit measures, holding by construction rather than by a hand-chosen date.

The promotion, compared and not eyeballed

Both ## ADDED requirement blocks were extracted programmatically by heading from the archived delta and from canon and hashed:

requirement scenarios bytes lines sha256 — archived delta AND canon diff
A containment guard answers every resolution failure and raises none 6 6,049 82 e12a9d9d54f64ac0c97d9c808f03df64583943f2d75760f0d3cb723ff33ffc7a exit 0, zero lines
A symlink-loop proof is built at test time and never committed 4 3,198 46 f98402134c0b7eb855d30c57792f8219ea4f17a5e1ade176df0381194b19d625 exit 0, zero lines

TEN SCENARIOS, the count the proposal, the ratification record and the README entry all carry, re-taken from the promoted text (grep -c '^#### Scenario:' → 6 and 4) rather than copied forward.

openspec/specs/release-realization/spec.md reads --numstat +130 −0, and --numstat -w reads the same 130 0, so not one changed line is whitespace-only. Capability requirement count 17 → 19. The delta carries no ## MODIFIED block, so no promoted byte is edited or removed, no Removed from canon by / Modified over / Merged into marker is owed, no modified-block-currency row is opened, and sequenced_after: [] stands as the corroborated root claim it was filed as. No ordered-delta child depends on this change (searched the active corpus for a sequenced_after: naming it; none).

The packet's files

All seven are R100 pure renames at 0 changed lines — .openspec.yaml, design.md, proposal.md, tasks.md, specs/release-realization/spec.md, review/ratification-2026-09-18.md and the new post-merge record — because the ticks landed in commit 1. The DELETE half and the ADD half are staged in the one commit, which is the git mv pathspec trap taken deliberately: git ls-files -- openspec/changes/harden-path-escape-helpers-against-symlink-loops returns 0 entries. The ratification record is moved and not edited.

README: the Active changes bullet is retired and an archived-ledger entry is added at the head of that list.

Commit 3 — 651613f6, the ledger seed

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 (the command the ledger's own header prescribes):

$ 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

--ledger-diff before: 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. 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 diff is one line:

-  harden-path-escape-helpers-against-symlink-loops: {state: active,   …, moved_by: "#1083", moved_on: "2026-09-17"}
+  harden-path-escape-helpers-against-symlink-loops: {state: archived, …, moved_by: "#1116", moved_on: "2026-09-18"}

The same commit writes PR #1116 into the README archived-ledger entry in place of the ARCHIVE-PR-NUMBER-PENDING marker commit 2 deliberately left; the real number does not exist until the pull request does, which is why it is a second commit and not a hand edit to the first.

Verification — every gate, against this same clone at origin/main

Both columns are the SAME CLONE at two commits, never a worktree against a clone: doc-health's release-inventory-drift arm reports differently inside a git worktree regardless of commit, so a cross-kind comparison would have invented four findings.

gate origin/main e3647b6d this branch 651613f6 exit
OPENSPEC_TELEMETRY=0 openspec validate --all --strict Totals: 108 passed, 1 failed (109 items) Totals: 107 passed, 1 failed (108 items) 1, both sides
python3 scripts/validate-sequenced-after.py . passed (47 active, 18 declaring) passed (46 active, 17 declaring) 0
— its archive-date arm passed passed 0
— its archive-date-vs-commit arm passed (13 dispositions in force) passed (13 dispositions in force) 0
python3 scripts/validate-sequenced-after.py . --ledger-diff consistent (221 rows) consistent (221 rows) 0
python3 scripts/validate-code-surface.py . 47 active / 47 declaring, archive 174 46 active / 46 declaring, archive 175 0
python3 scripts/validate-target-release.py . — 46 active / 46 declaring, 0 outside the vocabulary 0
python3 scripts/proposal-support.py . verify — proposal support verification ok 0
python3 -m pytest tests/sequenced_after tests/code_surface tests/target_release tests/proposal-support -q 738 passed, 297 subtests passed 738 passed, 296 subtests passed 0
python3 scripts/doc-health.py --single-repo . 31 critical / 20 error / 28 warning / 21 info, 100 findings identical: 31 / 20 / 28 / 21, 100 findings 0

THE ONE --all --strict FAILURE IS main's OWN AND IS PRE-EXISTING. Details: openspec validate add-chain-attestation --type change on both sides, byte for byte. Reported and not touched, per this lane's brief. The item count drops by exactly one because an active change became archived.

THE ONE pytest SUBTEST DELTA IS THIS ARCHIVE ITSELF, IDENTIFIED RATHER THAN WAVED AT. 738 passed on both sides, zero failures on both. The subtests all come from tests/proposal-support/; the sweep at tests/proposal-support/test_proposal_support.py:2272 runs one subtest per ACTIVE change (with self.subTest(change=directory.name), skipping archive/), and the active corpus goes 47 → 46. The sibling sweep at :4567 iterates active and archived, and its count is unchanged at 221 — which is the ledger's row count too.

THE doc-health DIFF IS TWO LINES AND BOTH ARE THIS PROMOTION'S OWN EFFECT. comm over the sorted finding lines returns 0 only-on-branch and 0 only-on-main; grep -c 'harden-path-escape' over the branch report returns 0; the report's own New regressions vs previous report: 0. The whole-output diff:

-Canon share by words: 40.7% (391367 canon words / 960852 governance words, promoted specs included).
+Canon share by words: 40.8% (392962 canon words / 962447 governance words, promoted specs included).
-| (promoted specs) | — | 288191 |
+| (promoted specs) | — | 289786 |

Canon words rise by 1,595, which is promoted canon gaining exactly what this archive promoted.

THE CLOSING-KEYWORD GREP, RUN RATHER THAN ASSUMED. Over this branch:

$ git log origin/main..HEAD --format='%H%n%B' | \
      grep -Eic '(clos(e|es|ed)|fix(es|ed)?|resolv(e|es|ed))[: ]*#[0-9]'
0

and the same grep over the realization branch (ebcdbc0c..bc9ebf95, 263 lines of commit message) and over its merge commit c22c4fc3 also returns 0; PR #1107's own title reads refs #1074. GitHub's own reading agrees: closingIssuesReferences on this pull request resolves to exactly [1074] and to nothing else.

Interaction with the sibling archive in flight

A SIBLING SEAT IS PREPARING PR #1112 (draft), the archive of amend-code-surface-grammar-comma-and, which promotes a ## MODIFIED block over Code-surface declaration grammar is gated onto the same file, openspec/specs/release-realization/spec.md, and edits the same README block and the same ledger file.

THE TEXTS DO NOT OVERLAP. This packet's two requirements are ALL-ADDED over titles novel to the corpus; #1112 rewrites units inside a DIFFERENT, pre-existing requirement. Neither touches a byte the other writes. But all three shared files are line-adjacent, so WHICHEVER OF THE TWO LANDS SECOND MUST MERGE main FIRST (gh pr update-branch, not a rerun — a rerun checks out the original merge commit and inherits the stale base). PR #1114 (archive of adopt-entry-grain-dispositions-form) shares the README block and the ledger with both, though not the spec file, and the same rule reaches it. This lane does not touch that packet, that branch or those pull requests.

Rule 6

This pull request touches openspec/changes/ (an archive rename) and the README OpenSpec Records block, so the Lane Collision Protocol Rule 6 landing window applies. This lane AUTHORS ONLY. The landing lane posts LANDING and LANDED on this pull request and in LANES.md; this branch is never merged, approved, closed or force-pushed by its author.

What this pull request does NOT do

Refs #1083
Refs #1107

🤖 Generated with Claude Code

Summary by Sourcery

Archive the ratified symlink-loop hardening change and promote its requirements after merged, green realization evidence.

Enhancements:

  • Archive the ratified harden-path-escape-helpers-against-symlink-loops change and promote its two symlink-loop and path-containment requirements into release-realization.
  • Record post-merge verification and preserve the archived change's provenance and evidence.

Documentation:

  • Move the change from the active OpenSpec list to the archived ledger and document its archived status and realization evidence in README.md.

Tests:

  • Add post-merge verification evidence covering realization merges, green CI, and byte-exact promotion of the requirements.

Chores:

brettheap and others added 2 commits September 18, 2026 17:41
…pture it

The evidence half of § 5.1 is in hand and every leg is cited rather than
asserted: the packet landed as #1083 -> ebcdbc0 (2026-09-18T14:03:33Z), § 3's
realization landed as #1107 -> c22c4fc (17:06:27Z) from head bc9ebf9, and
pytest-suite decided SUCCESS on main at 049d54a (run 35372664200, 17:09:27Z),
a tree that CONTAINS c22c4fc -- measured, compare/c22c4fc3...049d54a reading
"ahead" and git merge-base --is-ancestor exiting 0 on each leg of
ebcdbc0 -> c22c4fc -> 049d54a.

§ 4.4 also corrects the head its own earlier note named: 8fb0fc9 was this
branch's head when that paragraph was written, one commit followed it
(bc9ebf9, the paragraph's own commit) and bc9ebf9 is the head #1107 merged
from. Both heads have a green pytest-suite, so no conclusion moves; the sha
does.

The OPERATOR half of § 5.1 -- Brett Heap's SEPARATE ARCHIVE WORD -- is NOT
claimed by any tick here and is not in this lane's gift. The pull request
carrying these ticks is opened as a DRAFT.

§ 5.2 and § 5.3 are ticked for the acts this branch performs: the governed
wrapper run that promotes and moves the packet (next commit), and the placing
of the single closing keyword in the archive pull request's body and in no
commit message on this branch or the realization branch. The ticks precede the
move because scripts/proposal-support.py's archive_change() refuses any literal
"- [ ]" line in tasks.md and has no bypass flag.

§ 6's three "- [~]" boxes are left exactly as they are: they document
successors and refused-not-owed work, not incomplete work.

review/verification-2026-09-18-post-merge.md is the packet's first and only
verification capture and records the evidence, the wrapper transcript and the
byte-for-byte transfer check of both promoted requirements.

Refs #1074
Refs #1083
Refs #1107

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…26-09-18, realized at c22c4fc)

Performed through the GOVERNED WRAPPER and never a bare `openspec archive`,
which tasks.md § 5.2 forbids:

    TZ=UTC python3 scripts/proposal-support.py . archive \
        harden-path-escape-helpers-against-symlink-loops --yes

exit 0. Its decisive lines: ORIGIN RETAINED (declaration unchanged since the
ratifying commit ebcdbc0); Totals: 1 passed, 0 failed (1 items); Task
status: Complete; Applying changes to
openspec/specs/release-realization/spec.md: + 2 added; Totals: + 2, ~ 0, - 0,
-> 0; archived as '2026-09-18-harden-path-escape-helpers-against-symlink-loops';
OK openspec-cli-pin @fission-ai/[email protected] verified against its content
address and every target validated --strict clean; NO SUPPORTING DOCS (origin
retained, nothing to package). The CLI is the content-addressed 1.12.0 pin, not
the 1.13.1 on PATH; --path-mode was not used. --date was not passed, so the
wrapper took today in UTC, 2026-09-18, which is also the UTC day of this commit
-- the identity archive-date-vs-commit measures, holding by construction rather
than by a hand-chosen date.

THE PROMOTION IS THE RATIFIED TEXT, MEASURED ON BOTH SIDES. Two ## ADDED
requirements, ten scenarios, onto openspec/specs/release-realization/spec.md:
--numstat +130 -0, and -w reads the same 130 0, so no changed line is
whitespace-only. "A containment guard answers every resolution failure and
raises none" -- 6 scenarios, 6,049 bytes / 82 lines, sha256
e12a9d9d54f64ac0c97d9c808f03df64583943f2d75760f0d3cb723ff33ffc7a on the
archived delta AND on canon. "A symlink-loop proof is built at test time and
never committed" -- 4 scenarios, 3,198 bytes / 46 lines, sha256
f98402134c0b7eb855d30c57792f8219ea4f17a5e1ade176df0381194b19d625 on both. Each
block was extracted programmatically by heading from either side and diffed to
zero lines. Capability requirement count 17 -> 19; no ## MODIFIED block, so no
promoted byte is edited or removed and no marker is owed.

All seven packet files are R100 pure renames at 0 changed lines; the delete
half and the add half are staged in this one commit, which is the git mv
pathspec trap taken deliberately. `git ls-files` over the old directory returns
0 entries.

README: the Active changes bullet is retired and an archived-ledger entry is
added at the head of that list. Its pull-request link is the deliberate marker
ARCHIVE-PR-NUMBER-PENDING, which the ledger-seed commit replaces with the real
number -- the number does not exist until the pull request does.

#1074 is NOT shut by this commit and no commit message on this branch carries a
closing keyword beside an issue number. The single closing keyword lives in the
archive pull request's body, per tasks.md § 5.3, and the issue shuts on that
pull request's merge.

Refs #1074
Refs #1083
Refs #1107

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 18, 2026 17:45
@sourcery-ai

sourcery-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

This draft archives the ratified path-escape hardening change by promoting two requirements into release-realization, moving the completed packet into the dated archive, and recording independently cited merged-plus-green evidence; reviewers should verify the wrapper-generated promotion, byte-for-byte requirement preservation, archive-date/merge-commit constraints, and that landing remains gated on Brett Heap’s separate archive word.

Sequence diagram for merged-plus-green archive flow

sequenceDiagram
    participant Packet as RatifiedPacket
    participant Main as main
    participant Realization as RealizationPR
    participant CI as pytest-suite
    participant Wrapper as proposal-support.py
    participant Archive as ArchivedChange
    participant Operator as BrettHeap

    Packet->>Main: PR1083 merge ebcdbc0c
    Realization->>Main: PR1107 merge c22c4fc3
    CI-->>Realization: success at bc9ebf95
    CI-->>Main: success at 049d54a9
    Main-->>Wrapper: merged-plus-green evidence
    Operator->>Wrapper: archive word
    Wrapper->>Archive: archive_change(--yes)
    Wrapper->>Main: promote 2 added requirements
    Wrapper-->>Archive: dated archive 2026-09-18
    Archive-->>Operator: merge archive PR
Loading

Entity relationship diagram for archive evidence

erDiagram
    RATIFIED_CHANGE ||--|| PACKET_LANDING : has
    RATIFIED_CHANGE ||--|| REALIZATION_MERGE : has
    REALIZATION_MERGE ||--|| GREEN_RUN : verified_by
    GREEN_RUN }o--|| MAIN_TREE : runs_on
    MAIN_TREE ||--|| ARCHIVE_ACT : enables
    RATIFIED_CHANGE {
        string name
        string code_surface
    }
    PACKET_LANDING {
        string merge_sha
        string pr_number
    }
    REALIZATION_MERGE {
        string merge_sha
        string head_sha
    }
    GREEN_RUN {
        string run_id
        string conclusion
    }
    MAIN_TREE {
        string commit_sha
    }
    ARCHIVE_ACT {
        string archive_date
        string operator_word
    }
Loading

Flow diagram for archive evidence and gating

flowchart LR
    A[Ratified change with non-empty code_surface] --> B[Packet landing PR1083 merged]
    B --> C[Realization PR1107 merged]
    C --> D[pytest-suite success on realization head]
    D --> E[pytest-suite success on main containing realization merge]
    E --> F[Governed wrapper promotes requirements and archives packet]
    F --> G{Separate archive word given?}
    G -->|No| H[Remain draft; do not land]
    G -->|Yes| I[Merge archive PR and close issue 1074]
Loading

File-Level Changes

Change Details Files
Archives the ratified OpenSpec change after recording merged-plus-green realization evidence and preserving the required separate archive-word workflow.
  • Ticks archive evidence and operator checklist items without claiming the outstanding archive word.
  • Adds post-merge verification provenance for packet landing, realization merge, mainline green status, ancestry, and wrapper execution.
  • Retains the archive pull request as a draft and documents merge-commit/date requirements, Rule 6 ownership, and sibling-packet coordination.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/tasks.md
Promotes two ratified requirements into the release-realization specification with byte-level integrity evidence.
  • Adds requirements covering RuntimeError-safe path-containment guards across candidate, parent, and root symlink-loop failures, including synchronized cross-module fixes and documented exception handling.
  • Adds requirements requiring symlink-loop fixtures to be created at test time, proof against both unfixed and fixed guards, and explicit handling of unreachable guards.
  • Records a +130/-0 canonical specification change, increasing the capability requirement count from 17 to 19 with no modified requirements.
openspec/specs/release-realization/spec.md
Moves the completed change packet into the dated archive and updates the README index.
  • Retires the change from Active changes and adds a dated Archived changes ledger entry with realization evidence, promotion hashes, and archive provenance.
  • Performs the packet move as pure renames while retaining ratification content and adding the verification record.
  • Adds the governed-wrapper archive result, pinned OpenSpec CLI provenance, and explicit origin-retention/no-supporting-documents outcome.
README.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/.openspec.yaml
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/design.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/proposal.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/tasks.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/specs/release-realization/spec.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/ratification-2026-09-18.md
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md

Assessment against linked issues

Issue Objective Addressed Explanation
#1074 Update all four path-containment guards across code_surface.py, target_release.py, and proposal-support.py to catch RuntimeError from symlink loops while preserving existing exception handling. ❌ The PR explicitly states that it moves no code, and the diff contains no changes to these scripts. It only archives the OpenSpec change proposal.
#1074 Update the affected guard docstrings or documentation to identify RuntimeError as a resolution failure that is handled by returning the guard's negative result. ❌ No guard docstrings or implementation documentation were changed. The PR archives specification text describing the desired behavior, but does not update the affected code documentation.
#1074 Add regression tests that construct symlink loops at test time and verify each guarded function returns None or False instead of raising. ❌ The PR explicitly says scripts and tests are untouched, and the diff contains no test additions or modifications. The archived requirement discusses such tests but does not implement them.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

…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]>

Copilot AI 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.

🟡 Changes recommended

Final documentation and verification-record nits remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Archives the symlink-loop hardening proposal after merged-and-green realization evidence and promotes two requirements into release-realization.

Changes:

  • Moves the proposal into the dated archive with ratification and verification records.
  • Adds requirements for path-resolution failures and test-time symlink-loop fixtures.
  • Updates the README archive ledger and corpus ledger.
File summaries
File Change / final review notes
tests/sequenced_after/corpus-ledger.yaml Marks the archived change.
README.md Updates active and archived records. Final nits: clarify the five pure renames, modified tasks.md, and new verification file (nit, 1 vote); describe the additional task evidence annotations (nit, 1 vote).
openspec/specs/release-realization/spec.md Adds the two promoted requirements.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/tasks.md Records completion and archive evidence.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/specs/release-realization/spec.md Stores the archived specification delta.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md Stores post-merge verification. Final nits: remove the host-local path (nit, 3 votes); correct the 87eb684d versus bc9ebf95 head labeling (nit, 1 vote); correct the rename inventory (nit, 1 vote); describe the task evidence annotations (nit, 1 vote); clarify that elided output is not verbatim (nit, 1 vote).
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/ratification-2026-09-18.md Preserves ratification evidence.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/proposal.md Archives the ratified proposal.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/design.md Archives design decisions and measurements.
openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/.openspec.yaml Preserves origin and ratification metadata.
Review details

Suppressed comments (6)

README.md:3363

  • The README repeats the claim that six files are R100 pure renames while listing the newly added verification record; the record itself says there was no earlier verification file. This should distinguish the five pure renames, modified tasks.md, and the new verification file so the archived-ledger evidence does not report a nonexistent rename.
  **THE SIX PACKET FILES MOVE AS `R100` PURE RENAMES AT ZERO CHANGED LINES**
  — `.openspec.yaml`, `design.md`, `proposal.md`,
  `specs/release-realization/spec.md`, `review/ratification-2026-09-18.md` and
  the new `review/verification-2026-09-18-post-merge.md` — except `tasks.md`,

README.md:3364

  • tasks.md is not changed only by the checkbox ticks: this PR also adds substantial §4.4/§5 evidence annotations, including the corrected realization head, run details, wrapper output, and promotion hashes. Please describe those annotations here as well; otherwise this archive record misstates what the archive commit contains.
  whose only change is § 4.4's and § 5's ticks, written in the commit BEFORE

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:147

  • This calls 87eb684d the realization head, but the same record says PR #1107 was merged from head bc9ebf95 and that bc9ebf95 followed the earlier measurement commit. Mislabeling the evidence commit makes the verification record internally inconsistent; describe 87eb684d as the measurement commit or cite bc9ebf95 as the PR head.
- **It does not re-open § 4.1–§ 4.3.** Those measurements were taken at the
  realization head `87eb684d` and are recorded in `tasks.md`; they are cited
  here, not re-performed.

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:130

  • This inventory says six files are R100 pure renames and includes this record, but lines 10–16 state that this is the first verification capture and the diff adds it. tasks.md is also modified rather than pure R100; separate the five pure renames, the modified tasks rename, and the newly added verification record so the archive evidence is accurate.
Six files, all `R100` pure renames at **0 changed lines** — `.openspec.yaml`,
`design.md`, `proposal.md`, `specs/release-realization/spec.md`,
`review/ratification-2026-09-18.md` and this record — except `tasks.md`, whose
only change is § 4.4's and § 5's ticks, written in the commit BEFORE the move
because `scripts/proposal-support.py`'s `archive_change()` refuses any literal
`- [ ]` line in `tasks.md` and there is no bypass flag. The ratification record
is moved and NOT edited.

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:127

  • This record repeats that tasks.md's only change was the §4.4/§5 ticks, but the diff also adds the detailed evidence and head correction in those sections. Please make the description cover the evidence annotations so the durable provenance is accurate.
only change is § 4.4's and § 5's ticks, written in the commit BEFORE the move

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:72

  • The record labels the following excerpt “verbatim,” but it replaces the wrapper's paths with … (for example on the pin-artifact and supporting-doc lines). Please say that the excerpt has host-specific paths elided, or include the exact output, so the evidence record does not claim byte-level fidelity it does not contain.
Exit **0**. Its decisive lines, verbatim:
  • Files reviewed: 5/10 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Section 4 (Provenance) of verification-2026-09-18-post-merge.md claimed
"every path in this file is repo-relative" while embedding the
workstation-specific path
`~/projects/xFactory/lane-tools-openxfactory-5/clone-archive-1074`.
Replace it with a repo-relative description ("a fresh clone of
`opensoft/openxFactory` at `e3647b6d`"), matching the branch-cut sha
already cited in the record's summary table, so the claim is true.

Grepped the whole archived packet directory
(openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/)
for `~/projects/`, `/home/brett`, and `/workspace/projects`: this was
the only occurrence.

Refs #1074

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Sonnet 5 <[email protected]>

Copilot AI 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.

🔵 Needs a closer look

Outstanding documentation, provenance, task-status, and call-order corrections remain.

Review details

Suppressed comments (5)

Previously missed (2) — in code that hasn't changed since the last review.

README.md:3367

  • This says the post-merge verification record was an R100 rename, but that file is newly added in this change (@@ -0,0 +1,161 @@) and had no counterpart in the active packet. Please distinguish the five unchanged renames, the edited tasks.md, and this new record so the archive history is not misreported.
    openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:130
  • The provenance summary incorrectly includes this record among the R100 renames. review/verification-2026-09-18-post-merge.md is a new file (it is added from /dev/null), so this record should report it as an addition and reserve R100 for the five unchanged packet files; tasks.md is the edited sixth pre-existing file.

README.md:3317

  • The archive act adds review/verification-2026-09-18-post-merge.md, but the new archived OpenSpec Records entry links only the proposal and ratification record. The repository constitution requires new documents to be linked in the README index (.specify/memory/constitution.md:68-70), and neighboring archived entries link their verification records too; please add this record's repo-relative link.
  WORD and the record
  [`review/ratification-2026-09-18.md`](openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/ratification-2026-09-18.md)
  is how it survives; ratifying commit `ebcdbc0c20eb`.

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/tasks.md:330

  • The new [x] tick leaves the immediately following evidence labeled LEFT OPEN and the file's preamble still says §§ 3–6 stay entirely open. Those statements describe the pre-archive draft state but are not marked as historical, so the archived task record now presents contradictory completion states; supersede or explicitly label the old status block when recording the completed verification.
    openspec/specs/release-realization/spec.md:1329
  • This scenario claims that a looped scanned root makes the root resolution fail before the candidate resolution, but both _unescaped implementations resolve candidate = repo_root / relative first and that candidate traversal raises when the root path loops (scripts/code_surface.py:787-792; scripts/target_release.py:658-663). The packet's own design/tasks record this ordering. Reword the scenario to cover failure of the paths needed for the containment decision without asserting the wrong call order.
- **WHEN** the root the guard resolves the candidate against is itself behind a symlink loop, so resolving the root fails rather than resolving the candidate
- **THEN** the guard MUST still answer, because a caller that cannot resolve its own root has a tree it cannot judge and not a defect to report
  • Files reviewed: 5/10 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…-path-escape-helpers-against-symlink-loops

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Refs #1074
Copilot AI review requested due to automatic review settings September 18, 2026 20:02

Copilot AI 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.

🔵 Needs a closer look

The unresolved archive-provenance documentation issues and high-risk merge/archive workflow warrant human review.

Review details

Suppressed comments (4)

README.md:3375

  • The README repeats the same incorrect rename inventory: the verification record is introduced as a new file in this diff, not an R100 rename. Please list the five actual pure renames, the edited tasks.md rename, and the newly added verification record so the archived-ledger evidence matches the tree.
  **THE SIX PACKET FILES MOVE AS `R100` PURE RENAMES AT ZERO CHANGED LINES**
  — `.openspec.yaml`, `design.md`, `proposal.md`,
  `specs/release-realization/spec.md`, `review/ratification-2026-09-18.md` and
  the new `review/verification-2026-09-18-post-merge.md` — except `tasks.md`,

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:127

  • This inventory is off by one: the diff adds review/verification-2026-09-18-post-merge.md at the archive path (@@ -0,0 +1,161), so it is not an R100 rename. The packet has five unchanged renames, one edited tasks.md rename, and this new record; describing the record as moved makes the archive provenance inaccurate.
Six files, all `R100` pure renames at **0 changed lines** — `.openspec.yaml`,
`design.md`, `proposal.md`, `specs/release-realization/spec.md`,
`review/ratification-2026-09-18.md` and this record — except `tasks.md`, whose
only change is § 4.4's and § 5's ticks, written in the commit BEFORE the move

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/review/verification-2026-09-18-post-merge.md:143

  • This record repeats the claim that the literal closing keyword is written in the PR body and “nowhere else”, while the same literal appears in this record and in tasks.md:454. Because this file is the archive evidence, scope the statement to PR bodies and commit messages or avoid repeating the keyword here.
- **It does not claim that #1074 is shut.** `Closes #1074` is written in the
  archive pull request's body and nowhere else; the issue shuts on that pull

openspec/changes/archive/2026-09-18-harden-path-escape-helpers-against-symlink-loops/tasks.md:455

  • These lines say the literal closing keyword is in the archive PR body and “in NO other place”, but the same literal Closes #1074 is committed in this task text and again in review/verification-2026-09-18-post-merge.md:142. That makes the archived evidence self-contradictory; remove the literal from the record or scope the claim to PR bodies and commit messages.
  • Files reviewed: 5/10 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…-path-escape-helpers-against-symlink-loops

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Refs #1074
Copilot AI review requested due to automatic review settings September 21, 2026 20:39

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Correct the archive file-classification and realization/landing provenance inconsistencies.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)

…87eb684

Copilot found the § 3 bullet naming 87eb684 as the realization head that
tasks.md's §§ 4.1-4.3 measurements were re-run at. 87eb684 is PR #1107's
intermediate merge of origin/main on that branch, not its actual head: the
realization head was bc9ebf9, merged to main as c22c4fc (already correct
at line 45's Green-at-the-realization-head row). The measurements were
genuinely taken at 87eb684 per tasks.md's own text, so that citation
stands; only the mislabel is corrected.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Refs #1074
Copilot AI review requested due to automatic review settings September 21, 2026 21:43

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Unresolved comments request corrections to file provenance, task-status and chronology text, and promoted scenario wording.

Review effort: Lite
Findings: None

Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Low severity Misclassified new verification record as R100 rename

README.md:3270

The new verification record cannot be an R100 rename: the PR itself describes it as the packet's first verification capture, and this diff adds it with no prior active counterpart. Please count only the five moved files as pure renames and describe this record as a new file; otherwise the archive audit's file provenance is inaccurate.

Low severity Incorrect provenance classification for verification capture

openspec/​changes/​archive/​2026-09-18-harden-path-escape-helpers-against-symlink-loops/​review/​verification-2026-09-18-post-merge.md:130

This record repeats the same provenance error: it calls the first review/verification-2026-09-18-post-merge.md capture an R100 rename even though no earlier verification file exists. Describe the five moved files as renames, this record as newly added, and tasks.md as the only moved file with content changes.

…-path-escape-helpers-against-symlink-loops

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Refs #1074
Copilot AI review requested due to automatic review settings September 21, 2026 22:03

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Three documented consistency issues remain in the README, verification record, and task preamble.

Review effort: Lite
Findings: None

…-path-escape-helpers-against-symlink-loops

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Refs #1074
Copilot AI review requested due to automatic review settings September 23, 2026 16:31

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

One or more issues must be addressed before approval.

Review effort: Lite
Findings: None

@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDING — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-23T16:55:13Z, PR #1116 into opensoft/openxFactory main

@brettheap
brettheap marked this pull request as ready for review September 23, 2026 16:55
@brettheap
brettheap merged commit 9f357e9 into main Sep 23, 2026
14 checks passed

@sourcery-ai sourcery-ai 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.

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 1 day and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDED — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-23T16:55:31Z, PR #1116 into opensoft/openxFactory main → merge 9f357e9; Archive harden-path-escape-helpers-against-symlink-loops on its merged-plus-green realization evidence (#1083 → ebcdbc0, #1107 → c22c4fc, main green at 049d54a)

brettheap added a commit that referenced this pull request Sep 23, 2026
…parator onto release-realization (refs #1092) (#1112)

Closes #1092 (the packet's § 4.2: the governing issue closes at the archive, by the closing keyword written in this pull request's body). ARCHIVE of amend-code-surface-grammar-comma-and: the ratified amendment (PR #1108 → 60d281a, Brett Heap's ruling of 2026-09-18 "Amend the text to admit ', and '") is promoted onto release-realization's *Code-surface declaration grammar is gated* (the four separators, `, and ` consumed first); code_surface none, so no realization evidence is owed. The active add-estate-repository-inventory packet, ordered after this one by sequenced_after, is registered as the remaining named MODIFIED writer in the modified-block-currency self-gate. LANDED by MERGE COMMIT on Brett Heap's word of 2026-09-21 ~20:40Z, verbatim "archive it #1112 and #1116". Refs #1108.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.

_unescaped catches OSError only: a symlink loop under openspec/changes raises RuntimeError through code_surface, target_release and proposal-support

2 participants