Skip to content

fix(zcode): bound default bootstrap file reads - #7039

Merged
lidge-jun merged 2 commits into
lidge-jun:devfrom
luvs01:codex/zcode-bounded-bootstrap-20261013
Oct 13, 2026
Merged

lidge-jun merged 2 commits into
lidge-jun:devfrom
luvs01:codex/zcode-bounded-bootstrap-20261013

Conversation

@luvs01

@luvs01 luvs01 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Default ZCode bootstrap discovery now uses the shared integration file reader. It accepts regular files up to 4 MiB and refuses oversized files, final symlinks (including dangling links), and FIFOs without blocking. Missing settings, valid settings without a relocation selector, ordinary relocation, and explicit ZCODE_DATA_DIR overrides retain their existing behavior.

The bounded reader is already on dev through #7029. This change contains only the default bootstrap call site, its real-file regressions, and the integration documentation; it does not reintroduce the parent reader changes.

Verification

Head: e949ce2468155cece152f68e395c653bd6102ba4. Base: a5cd5a2b832d727cfef5e77c48547b47b1cbeebb. One commit, four changed files. Tests used the pinned Bun 1.4.3.

  • Focused regressions and repository guards: 321 passed, 0 failed across 12 files, including boundary, relocation, override, symlink, FIFO, integration writer/state, core/Lab boundary, file-size ratchet, repository hygiene, structure, and test-layout coverage.
  • bun run typecheck, bun run structure:check, and bun run privacy:scan: passed.
  • cd docs-site && bun install --frozen-lockfile && bun run build: passed; 569 pages and 79,369 internal links checked. Existing syntax-highlighting, chunk-size, and missing-content warnings remain.
  • The new boundary regressions fail against the original unbounded implementation: oversized-file, symlink, and FIFO cases fail as intended.
  • The candidate changed-mode run, selecting changes relative to the base, ran 9,237 tests across 396 files: 9,097 passed, 34 skipped, 106 failed, and 1 error. This run is not green.
  • All 106 failed test identifiers also failed on the clean base in targeted comparisons using the same official wrapper, Bun version, isolation, four workers, default timeout, and loopback proxy exclusions. The late asynchronous error also reproduced on the base. Reversing the execution order reproduced the timing-sensitive failures on both revisions. No added regression was demonstrated in these comparisons.
  • Baseline failures include temporary-directory ownership constraints, unavailable systemd, proxy restrictions, fixture permissions, and existing timeout/teardown interactions. Guards and permissions were left unchanged. The full unfiltered suite was not repeated; follow-up validation targeted the failed identifiers instead.
  • JSDoc now documents the bootstrap reader and fixture helpers. The comment-only additions transpile to identical JavaScript. CodeRabbit has not re-evaluated these additions on this head.
Exact focused regression command
bun run test \
  tests/providers/zcode-client.test.ts \
  tests/lib/bounded-file-read.test.ts \
  tests/clients/integrations-current-store.test.ts \
  tests/clients/integrations-state.test.ts \
  tests/clients/integrations-writer.test.ts \
  tests/clients/integrations-writer-guard.test.ts \
  tests/lab/core-lab-boundary.test.ts \
  tests/ci-workflows/file-size-ratchet.test.ts \
  tests/ci-workflows/repo-hygiene.test.ts \
  tests/ci-workflows/structure-ssot.test.ts \
  tests/test-layout.test.ts \
  tests/test-layout-tooling.test.ts

This remains a draft. As of 2026-10-13 11:54 UTC, exact head e949ce2468155cece152f68e395c653bd6102ba4 had 34 successful check runs, 7 conditionally skipped, and no failures or pending checks. Cross-platform CI passed all 4 Linux and 9 Windows test shards; the macOS full-test lanes were conditionally skipped. Catalog async contracts passed on Linux, Windows, and macOS. PR processing, including resolve-pr and enforce-target, passed. CodeRabbit skipped review because this PR is a draft; its successful status does not mean a review was completed. Native Windows/macOS execution has not been performed locally. Local baseline equivalence is not a claim that the full suite passed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Use the shared integration reader for default ZCode bootstrap discovery.
Preserve relocation and explicit data-root overrides, cover real-file
boundaries, and document the bootstrap and fixture contracts.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration (dev-only bypass per MAINTAINERS.md), not an independent approval.

Exact head 67d0141391230531338be5b240359a9a2d42677d (current dev merged in, no force-push): hosted Cross-platform CI passed all required jobs (Linux 4/4, Windows 9/9, gates, aggregate ci); path-filtered jobs skipped. Independent exact-head review (gpt-6.1-sol, read-only): MERGE-OK, no findings, covering the 4 MiB boundary, symlink/FIFO refusal, relocation and explicit-override behavior. The combined tree with #7036/#7038 on dev passed typecheck, structure, privacy, the file-size ratchet, layout and the core/Lab boundary. No outstanding review threads or change requests. CodeRabbit skipped this PR as a draft, so no CodeRabbit review exists.

@lidge-jun
lidge-jun marked this pull request as ready for review October 13, 2026 15:03
@lidge-jun
lidge-jun merged commit a29cb3d into lidge-jun:dev Oct 13, 2026
42 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-10-13T15:10:29.864304Z 67d0141 Draft marked ready
ℹ️ 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.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants