Skip to content

Context 0.7.106: complete outside checkouts, batch preview and source refresh guidance - #119

Merged
qiansc merged 1 commit into
mainfrom
feat/0.7.106-completion
Nov 28, 2026
Merged

qiansc merged 1 commit into
mainfrom
feat/0.7.106-completion

Conversation

@qiansc

@qiansc qiansc commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes Context 0.7.106 on top of #118 (whose release was withdrawn before npm publish).

Background. A full local source refresh of a production knowledge base (4 repositories, 69 Lark documents, 34 page revisions in 4 batches) with the 0.7.106 build found the remaining gaps below; a code review round followed.

Changes.

  • articleReferenceInput.ts: writing a new page from a repository whose registered link points to a checkout outside the workspace now works. The registration's parent directory must be the workspace or inside it (top-level custom materializedAt keeps working), relative roots resolve against the workspace, and per-file realpath and captured-digest checks are unchanged.
  • approvedRevisionSubmission.ts: the batch preview checked pages against the task input files, which carry no processed_scopes, so stale citations of processed sources passed preview and failed only at submission. The preview now uses the processed scopes of the issued requests.
  • context update --schema: status, the pending-update response and expand_scope already pointed to it; it now prints the input schema, and the missing-input error names it.
  • exactQuoteLocator (shared by the kept-reference error and source-update evidence): offered only when the quote is unique, resolves back to the same lines and is not a capture gap. kept-reference-unresolved distinguishes changed text, lines past the end of the file, and unreadable sources.
  • source-outside-revision: when the source belongs to the page's source update, the message points to task adjust for the revision and to supporting_sources in later decisions.
  • Guidance: shared sources listed once per requirement, preview a source-update batch to find citations to re-cite, positional document evidence, formatting-only changes and their reference_warnings, .tmp/repo aliases for outside checkouts, run records counted as generated output, missing file source directories.

Compatibility

No new protocol, configuration files or fields. Old workspaces need no migration. Behaviour changes are limited to accepting outside checkouts (reads still stay inside the checkout), error text, a read-only --schema flag, and the preview now matching submission.

Risks. The preview can now report issues it used to pass; they are the same issues submission already rejected.

Verification

  • New tests: articleReferenceInput.test.ts (outside checkout, top-level registration plain and linked, relative root, escape rejected; fails on the previous check), projectPendingSourceUpdate.test.ts (outside checkout reads, ../ rejected, batch preview blocks stale processed citations; fails without the fix), articleSourceReaderBoundary.test.ts, submittedSourceLocator.test.ts, approvedRevisionReferences.test.ts, knowledgeUpdateSchema.test.ts.
  • 79 related test files (451 tests) run one by one, plus plugin and workflow resource tests; typecheck and lint pass.
  • End to end on a copy of a production knowledge base: verify reported 466 source-path-outside-scope with 0.7.105 and none with this build; all four batches settled, build and verify passed.

Checklist

  • bun run verify:full passes.
  • Lifecycle changes include route and recovery tests.
  • Published package metadata and local pack behavior were checked when affected.
  • English and Simplified Chinese user documentation remain behaviorally equivalent.
  • Runtime code remains compatible with Node.js 20+.
  • No generated output, secrets, private sources, or local workspaces are included.

🤖 Generated with Claude Code

- New pages read repositories whose registered link points to a checkout
  outside the workspace; the registration must stay in the workspace
  (directly under the root is fine) and reads stay inside the checkout.
- Batch revision preview checks citations against the processed scopes, as
  submission does, so stale citations block in preview too.
- `context update --schema` prints the update input schema that existing
  hints point to; the missing-input error names it.
- Quote locators are offered only when they resolve back to the same lines
  and are not capture gaps; kept-reference errors name unreadable sources
  and lines past the end of the file.
- source-outside-revision points to task adjust for the revision and to
  supporting_sources in later source-update decisions.
- Guidance: shared sources listed once per requirement, preview before
  re-citing, positional document evidence, formatting-only changes,
  .tmp/repo aliases, run records as generated output, missing file sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit ab85d1f into main Nov 28, 2026
2 checks passed
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