Skip to content

fix(context): keep generated snapshots out of module routing and pointer bloat - #416

Merged
stackbilt-admin merged 2 commits into
mainfrom
fix/issue-401-generated-context
Nov 3, 2026
Merged

stackbilt-admin merged 2 commits into
mainfrom
fix/issue-401-generated-context

Conversation

@stackbilt-admin

@stackbilt-admin stackbilt-admin commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

A bootstrap/context-refresh/bootstrap cycle treated Charter's live context snapshot as an orphaned instruction module and registered the generic trigger context. Doctor then counted the generated CLAUDE Session Start paragraphs as user trigger density. Skip automatic registration only for the known runtime snapshot signature, and omit one exact canonical CLAUDE session block from pointer-bloat scanning. Existing explicit registrations, hand-authored context modules, edited instructions and user additions remain visible and preserved.

Closes #401.

Validation in isolated issue-401 worktree, Windows Node 24.19.0 / pnpm 9.15.9:

  • Frozen dependency install: pass.
  • Build and typecheck: pass.
  • New regression suite plus vendor/doctor suite: 69/69 pass. Broader bootstrap run: 112 pass, one known Windows POSIX-host premise failure.
  • Against original bootstrap/doctor source, three regression cases fail; the fix restores all eight new tests. Covers the real minimal cycle, existing explicit context entry, real manual-module registration and user bloat, runtime snapshot output in a custom directory, filesystem-aware filename case variants, CRLF, edited/duplicated pointer instructions, and extra hand-authored RULES not being exempted.
  • git diff --check: pass; existing tracked LF line endings preserved. No LOC ceiling changes.
  • Full pnpm run test: 1,933 passed and four failed (1,937 total); all four failures exactly match the established Windows baseline. Log: .cache/issue-401-case-full-tests.log. The established four Windows baseline failures concern bootstrap's POSIX premise, context-refresh/serve path separators, and Ctrl-D fake TTY.

This changes no routing entries already selected by the user, does not modify runtime snapshots, and does not add custom-ai-dir support to commands that currently use .ai. Main CI's dependency audit is handled separately by #404 and #413; no gate is weakened. No merge, publication, deployment, production write, tag/main push, or remote deletion performed.

Independent review follow-up: bootstrap now passes its detected filesystem case-sensitivity into generated filename identification. On case-insensitive filesystems, Context.adf is the runtime snapshot and is not auto-registered; on case-sensitive filesystems it remains a distinct name. A real renamed-snapshot cycle and strict/manual-name negative controls cover this. Existing explicit registrations and user content remain preserved. One earlier focused run under concurrent full-suite load hit a 5-second timeout in an existing vendor scoring test; the completed final full suite passes that test.

@stackbilt-admin
stackbilt-admin merged commit 400bc07 into main Nov 3, 2026
6 of 7 checks passed
@stackbilt-admin
stackbilt-admin deleted the fix/issue-401-generated-context branch November 27, 2026 23:55
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.

doctor --ci reports vendor bloat on Charter's own CLAUDE.md after context.adf is auto-registered

2 participants