Skip to content

Preserve source identity and null examples during document processing - #702

Open
daveshanley wants to merge 7 commits into
mainfrom
codex/localfs-identity-20261108
Open

daveshanley wants to merge 7 commits into
mainfrom
codex/localfs-identity-20261108

Conversation

@daveshanley

@daveshanley daveshanley commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

API documentation and retained-input analysis exposed three input-preservation defects: concurrent local opens could replace an existing parsed tree, nullable examples became the string "", and remote retrieval URLs could be mistaken for host overrides.

  • Recheck the local file cache under the cold-load reservation. Existing readers keep the same file/tree; the cached hot path is unchanged.
  • Preserve decoded null examples while retaining literal "" strings.
  • Use an OpenAPI 3 retrieval URL as the relative-reference base without replacing an explicit BaseURL or $self policy. Resolve remote references as URIs, preserving their host, query and escaped path; decode only the fragment. Local file references keep their existing behavior.

Validation: deterministic stale-miss and nullable-example regressions fail before their fixes. Exact retrieval-URL tests cover root-relative, scheme-relative, cross-origin, query, escaped-path and lazy-schema resolution. Independent adversarial testing verified 16 exact-URI cases and no unexpected fetches. Focused race tests pass. Owning-package tests cover the new fallback and local-pointer branches. Bunkhouse's full Doctor race suite passes against this source. Final-head CI passes Linux and Windows. CodeQL and both patch/project coverage checks pass.

Risk: medium. URI resolution, concurrent cold-load publication and generated values are shared library behavior. Explicit BaseURL host override and $self precedence remain covered. No new public option, permission rule or cached hot-path work is added. Bare external named-anchor handling is an existing limitation outside this repair. No merge or release is included.

@codecov

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f6e97f4) to head (794be11).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #702   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          315       315           
  Lines        39762     39755    -7     
=========================================
- Hits         39762     39755    -7     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@daveshanley daveshanley changed the title fix(index): preserve local file identity during concurrent opens fix: preserve local source identity and null examples Nov 8, 2026
@daveshanley
daveshanley marked this pull request as ready for review November 8, 2026 16:06
@daveshanley daveshanley changed the title fix: preserve local source identity and null examples Preserve source identity and null examples during document processing Nov 8, 2026
daveshanley and others added 2 commits November 10, 2026 09:11
A caller that missed the remote cache could win a fresh reservation after
another fetch had already published its file and retired its waiter. It
then fetched again and replaced the published file. Recheck the cache
under the new reservation, matching the local loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Null examples now reach the XML renderer as nil. Attributes and text
nodes still went through fmt.Sprint and rendered "<nil>". Skip them, as
null elements already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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