Skip to content

CORE (signing sitting): KNOWN-LIMITS 83, fold backslash before path classification (queued patch + rehearsal) - #104

Open
githubscum wants to merge 2 commits into
mainfrom
lotor-lane/l83-backslash-fold
Open

githubscum wants to merge 2 commits into
mainfrom
lotor-lane/l83-backslash-fold

Conversation

@githubscum

Copy link
Copy Markdown
Owner

WO: WO-L83-01, revised as WO-L83-02 (lane run 199). Limit: KNOWN-LIMITS 83. Core: yes. This is a queued patch plus its rehearsal, in the same shape as #103 (L81) and L77. No file under the core directories is touched. The patch lands only at a signing sitting.

What it does

path.resolve treats a backslash as a separator only on win32. On Linux and macOS, that means:

  • the backslash spelling of a core file classifies as grantable instead of core;
  • C:\other\repo\x classifies as grantable instead of refused;
  • .\deploy is not gated as opaque exec.

The patch folds backslash to forward slash before classification, at both sites (the grant path classifier and the policy's extensionless-local-file check). It also refuses a drive-letter absolute path on a non-Windows host. The limit's own fix line leaves that refusal out: once the backslash is folded, C:/other/... is still a relative path on POSIX and would resolve inside the repo.

Three files:

  • proposals/make-l83-patch.mjs: the generator. It reads the sources read-only, LF-normalizes them as make-l81 does, and asserts each replacement occurs exactly once.
  • proposals/l83-backslash-fold.patch: the generated patch, LF-only, 2157 bytes.
  • test/known-limits-83-backslash-patch.test.js: the rehearsal. It applies the patch in a temp copy, never in the repo.

Tested

  • Rehearsal: 6/6 pass, covering apply --check, backslash core, drive-letter refusal, forward-slash no-regression, the policy opaque-exec case, and repo unchanged.
  • npm test: 1465 tests, 1459 pass, 0 fail, 6 skipped (Windows, this checkout).
  • A probe of non-string input: the existing type guard at the top of the classifier still refuses it before the new .split runs.

Provenance

  • Executor round 1 was glm-5.3-flash:cloud: one stall, then a draft that preserved CRLF per file and gave a patch with mixed line endings that git apply rejected.
  • Round 2 was minimax-m3:cloud: it rewrote the generator to LF-normalize. The model is confirmed by the dispatch's [dispatch] model: line and the stderr unrecognized_model {"model":"minimax-m3:cloud"} line.
  • ike re-read the patch, ran the generator and the tests.

What a reviewer should doubt

  • On this Windows host, checks (c), (d) and (f) cannot discriminate. The unpatched code already gets those cases right on win32. The POSIX half is proven only when CI runs the rehearsal on Linux. Look at the CI result, not this host's result.
  • The drive-letter refusal tests only X:/ at index 0. A bare C: or C:foo (drive-relative) on POSIX stays relative and resolves inside the repo. That is arguably correct (it is a legal POSIX filename), but it is a judgment call.
  • The fold also rewrites legitimate POSIX filenames that contain a backslash. These are rare, and the patch reads them as a separator by design. That trade-off is the limit's own.
  • KNOWN-LIMITS 83's text is not amended here, because that needs a re-stamp. It goes with the landing, as with CORE (signing sitting): KNOWN-LIMITS 81, fold CRLF in the pin body digest (queued patch + rehearsal) #103.

🤖 Generated with Claude Code

…arsal (CORE, signing sitting)

Generator LF-normalizes sources (make-l81 style); patch folds backslash to
slash in the grant path classifier and the extensionless-file check, and
refuses drive-letter absolute paths on non-Windows hosts. Rehearsal 6/6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@githubscum

Copy link
Copy Markdown
Owner Author

Lane run 202 (2026-11-16 CST), review note, no code change.

The doubt this PR's body flagged is answered by its own CI. On Windows, cases (c), (d) and (f) cannot discriminate, so the Linux job was the real proof. It is green:

  • test (ubuntu-latest, node 22), run 43889041312: ok 128 - KNOWN-LIMITS 83 backslash-fold patch rehearsal. The patch applies (git apply --check), it carries no CR byte, a backslash spelling of a core file classifies as core, a drive-letter backslash path into another directory refuses, and the forward-slash and plain non-core verdicts are unchanged.
  • Suite on that job: 1465 tests, 1456 pass, 0 fail, 6 skip, 3 todo. The 3 todo are main's existing limit-83 tripwires, and they are expected to stay red until the patch lands.

What is still unproven: the rehearsal is run against a patched copy, not the live tree. After the sitting applies it, the three limit-83 TODO tripwires should turn to ok on ubuntu, and that flip is the closing check.

The four patched-copy tests called t.skip() when the patch had landed, but
their callbacks took no parameter. On main they never reached that line, so
CI stayed green. Once the queued patch is applied, each one throws
ReferenceError: t is not defined and npm test goes red at the sitting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@githubscum

Copy link
Copy Markdown
Owner Author

Revision: 1 commit, test file only. The patch is unchanged.

The bug. Four rehearsal tests called t.skip() once the patch had landed, but their callbacks did not declare t. CI could not see this, because the skip line only runs after landing. With the patch applied, all four threw ReferenceError: t is not defined, so npm test would have gone red at the sitting.

How it was found. A throwaway merge of the queued PRs (#94, #101, #102, #103, #104, #105) with both queued patches applied on top.

Tree (Windows, node test runner) Result
This branch, patch not applied 1465 tests, 1459 pass, 0 fail, 6 skipped
Joint merge, patches not applied, before this fix 1535 tests, 1529 pass, 0 fail, 6 skipped
Joint merge, both patches applied, before this fix 1535 tests, 1517 pass, 4 fail, 14 skipped
Joint merge, both patches applied, after this fix 1535 tests, 1517 pass, 0 fail, 18 skipped

For landing. #94 and #105 conflict in the KNOWN-LIMITS pin block only, and a re-stamp resolves it. The other pairs among these six merge cleanly. #90 and #91 conflict in KNOWN-LIMITS with every one of them.

What to doubt. The joint run was on Windows only. The joint tree was a local throwaway, so CI has not seen it. Once landed, these four tests skip, so they no longer exercise the fold; the limit's own tripwires have to carry that.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant