Skip to content

Fix cross-platform document path diagnostics - #3128

Merged
Chris0Jeky merged 5 commits into
mainfrom
fix/doc-link-path-diagnostics-20260916
Sep 17, 2026
Merged

Chris0Jeky merged 5 commits into
mainfrom
fix/doc-link-path-diagnostics-20260916

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Refs #2762 and #3067. Related parser work remains in #3102.

Outcome

Fixes two path-resolution defects:

  • wrong-case files and directories now report wrong case on case-sensitive filesystems, rather than missing; they still fail validation;
  • names such as ..notes.md and ..notes/Guide.md are allowed inside the repository; only an actual .. path segment is treated as parent traversal.

Missing suffixes remain missing. The case diagnostic follows only an unambiguous directory entry; it does not rewrite links or accept a differently cased target. Parsing, scan scope, dependency files, and CI/control-plane wiring are unchanged.

Current-main reconciliation

Head f7033e6cbfad73d92af98ad9753f0d7cab52b821 merges current main cb204adcc73ebeb3834eae714edc5ecadebf99fc while preserving exactly the two intended files:

  • scripts/check-doc-links.mjs
  • scripts/check-doc-links.path.test.mjs

The intervening main change is the merged k6 harness repair #3133 and does not overlap the documentation-link checker. The final tree overlays the previously reviewed/tested two blobs onto that main tree rather than replacing unrelated work.

Verification

Author-side evidence on the unchanged checker/test blobs:

  • eight new real-filesystem regressions produced six failures on the original source and pass after the correction;
  • the 16 existing fixture-based tests also pass, including the previously failing wrong-case test;
  • node --test --test-skip-pattern='the repository itself' scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs — 24 passed;
  • node --check scripts/check-doc-links.mjs — passed;
  • tested checker blob: f812352f438869adf5cb1a37eebe2d8cbb2a9ac1.

Prior head 59f32755d3f2b6dc29f896f8e940d0e4a6a601bd had clean Codex review and green CI Extended; its required run was still executing when main advanced. Fresh exact-head hosted CI, Windows execution, the full-repository link check, and review are required on f7033e6cbfad73d92af98ad9753f0d7cab52b821 before merge.

#3102 touches the same checker. Land this path-diagnostic correction first, then retain it when rebasing the parser/masking work rather than replacing the file wholesale.

Copy link
Copy Markdown
Owner Author

Verification checkpoint for unchanged head ad793822b832f519a5afb0948967fe8949e75db3:

  • Published checker and new tests match the locally executed blobs (f812352f438869adf5cb1a37eebe2d8cbb2a9ac1, dc9e26aeaabdfe4c595d35646b29d950f1818da8). Fresh local rerun: 24 fixture tests passed; syntax check passed.
  • Hosted Smart CI Self-Test and CI Extended passed. Main CI run 35156663441 is still running; completed jobs include both frontend OS lanes, containers, migrations, architecture and governance. These are not substitutes for this checker's own regression suite.
  • The full-repository link assertion was not run in this partial local checkout. Before merge, run node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs and node scripts/check-doc-links.mjs in the complete checkout.

Kept draft until remaining qualification is complete. A scoped review on #3102 records how to integrate these path hunks without overwriting its parser changes.

@Chris0Jeky Chris0Jeky left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fresh-context review found no blocking correctness issue in this bounded path-resolution change.

Checked at exact head ad793822:

  • containment now rejects only an actual parent segment (.. or ../...), so legal ..notes* names stay inside the repository;
  • case-folded lookup is diagnostic-only and still requires a single unambiguous entry at every segment;
  • a missing leaf below a differently cased directory remains missing, rather than being misreported as a case-only target;
  • correct-case targets still pass through the existing exact-case validator;
  • the real-filesystem tests cover file and directory case, traversal, percent decoding, missing suffixes, and whole-scan behavior.

Fresh hosted evidence is green for required CI 35156663441, CI Extended 35156663399, and Smart CI Self-Test 35156663028. I left the PR in draft because #3102 modifies the same parser and its masking/parser work must be retained during integration.

Copy link
Copy Markdown
Owner Author

Rechecked head ad79382: required CI 35156663441, CI Extended 35156663399 and Smart CI 35156663028 have all completed successfully.

The separate full-repository node scripts/check-doc-links.mjs run and unskipped node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs are still not evidenced by this session. The current docs-governance job does not execute that link suite, so its green status is not a substitute. Keeping the draft/readiness boundary explicit. Retain #3102's parser changes when integrating the path-only hunks.

@Chris0Jeky
Chris0Jeky marked this pull request as ready for review September 17, 2026 15:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T16:00:21.425410Z 76461c4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 59f32755d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head f7033e6cbfad73d92af98ad9753f0d7cab52b821. The checker and path-regression blobs are unchanged from the previously reviewed head; this merge commit only incorporates main's disjoint #3133 load-harness repair.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: f7033e6cbf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Owner Author

@codex please verify exact head f7033e6cbfad73d92af98ad9753f0d7cab52b821 without modifying files. Confirm the SHA, then run:

  • node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs
  • node --check scripts/check-doc-links.mjs
  • node scripts/check-doc-links.mjs
  • git diff --check

Report exact counts/output and leave the checkout clean. Do not commit or push.

@chatgpt-codex-connector

Copy link
Copy Markdown

Verification Result

Confirmed the checkout was at the requested exact head:

f7033e6cbfad73d92af98ad9753f0d7cab52b821

All requested checks passed:

  • node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs
    • 25 tests passed
    • 0 failed
    • 0 cancelled
    • 0 skipped
    • 0 todo
    • Duration: 246.362689 ms
    • The repository-wide subtest passed in 141.166299 ms.
  • node --check scripts/check-doc-links.mjs
    • Exit code 0
    • No output.
  • node scripts/check-doc-links.mjs
    • Exact output: Doc link check passed (710 Markdown files, 0 broken relative links).
    • Exit code 0.
  • git diff --check
    • Exit code 0
    • No output.

Checkout State

After verification:

HEAD=f7033e6cbfad73d92af98ad9753f0d7cab52b821

Both git status --short and git status --porcelain=v1 --untracked-files=all returned no output. The checkout is clean, including no untracked files.

No files were modified, and no commit, push, or pull request was created.

Outstanding Repository Items

OUTSTANDING_TASKS.md currently contains 41 open checklist items, including release-trust decisions, remaining acceptance criteria, maintainer-only credential/device work, CI control-plane gates, and product rulings. OUTSTANDING_TASKS.mdL18-L23 OUTSTANDING_TASKS.mdL39-L82 OUTSTANDING_TASKS.mdL91-L122 OUTSTANDING_TASKS.mdL143-L168 OUTSTANDING_TASKS.mdL178-L211

View task →

Copy link
Copy Markdown
Owner Author

Synchronized with current main without rewriting the reviewed implementation.

  • New exact head: 76461c44aeb48e83880c739c4c4b37efc32e4ddf
  • Parents: verified head f7033e6cbfad73d92af98ad9753f0d7cab52b821 and current main b32ec2dbe5e5e7100e1dedd459cc542beca782dd
  • Both PR-owned blobs are byte-identical to the prior 25/25 verified head.

The outdated long-running Windows workflow can no longer qualify the merge candidate; fresh exact-head CI is now authoritative.

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact merge head 76461c44aeb48e83880c739c4c4b37efc32e4ddf. Confirm that the PR-relative diff remains the same two link-checker files and that synchronization with current main introduced no behavior change or scope expansion.

Copy link
Copy Markdown
Owner Author

@codex please verify exact head 76461c44aeb48e83880c739c4c4b37efc32e4ddf without modifying files. Confirm the SHA before and after, then run:

  • node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs
  • node --check scripts/check-doc-links.mjs
  • node scripts/check-doc-links.mjs
  • git diff --check
  • git diff --name-status b32ec2dbe5e5e7100e1dedd459cc542beca782dd...HEAD

Report exact totals/output and final PR-relative inventory. Do not commit or push.

@chatgpt-codex-connector

Copy link
Copy Markdown

Verification Result

Confirmed the checkout remained at the requested exact head throughout:

Before: 76461c44aeb48e83880c739c4c4b37efc32e4ddf
After:  76461c44aeb48e83880c739c4c4b37efc32e4ddf

The verified implementation performs diagnostic-only case-folded lookup without accepting incorrectly cased targets. scripts/check-doc-links.mjsL129-L145 The accompanying regression coverage includes wrong-case files/directories, missing suffixes, legitimate two-dot-prefixed names, traversal, percent decoding, and complete-scan behavior. scripts/check-doc-links.path.test.mjsL22-L77

Checks

  • node --test scripts/check-doc-links.test.mjs scripts/check-doc-links.path.test.mjs

    • 25 tests
    • 25 passed
    • 0 failed
    • 0 cancelled
    • 0 skipped
    • 0 todo
    • 0 suites
    • Total duration: 276.291713 ms
    • Repository-wide subtest duration: 166.415612 ms

    Exact TAP summary:

    1..25
    # tests 25
    # suites 0
    # pass 25
    # fail 0
    # cancelled 0
    # skipped 0
    # todo 0
    # duration_ms 276.291713
    
  • node --check scripts/check-doc-links.mjs

    • Exit code 0.
    • No output.
  • node scripts/check-doc-links.mjs

    • Exit code 0.
    • Exact output:
    Doc link check passed (710 Markdown files, 0 broken relative links).
    
  • git diff --check

    • Exit code 0.
    • No output.
  • git diff --name-status b32ec2dbe5e5e7100e1dedd459cc542beca782dd...HEAD

    • Exit code 0.
    • Exact PR-relative inventory:
    M	scripts/check-doc-links.mjs
    A	scripts/check-doc-links.path.test.mjs
    

Final Checkout State

Both the before-and-after git status --porcelain=v1 --untracked-files=all checks returned no output. The checkout is clean, including no untracked files.

No files were modified. Per the request, I did not commit, push, or create another pull request.

Outstanding Repository Items

OUTSTANDING_TASKS.md contains 41 open checklist items. The first outstanding items concern publisher/domain decisions, protected signing enrollment, and signed Windows installer acceptance. OUTSTANDING_TASKS.mdL18-L20

View task →

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 76461c44ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Chris0Jeky
Chris0Jeky merged commit f4a3e07 into main Sep 17, 2026
36 checks passed
@Chris0Jeky
Chris0Jeky deleted the fix/doc-link-path-diagnostics-20260916 branch September 17, 2026 17:22
@github-project-automation github-project-automation Bot moved this from Pending to Done in Taskdeck Execution Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant