Skip to content

feat: report every production citation problem at once, keep moved evidence, and unblock stuck routes - #103

Merged
qiansc merged 1 commit into
mainfrom
feat/v0.7.97
Nov 10, 2026
Merged

qiansc merged 1 commit into
mainfrom
feat/v0.7.97

Conversation

@qiansc

@qiansc qiansc commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Feedback from a fully managed 11-stage integration on 0.7.96 (14 new and 15 revised articles): production-stage citation checks stopped at the first problem and re-signed text at old lines, large repositories timed out in a 5-second readiness check, synced blocks without access failed whole documents, navigation-only changes had no route, and several errors did not say what to do next.

  • Production-stage citations. Article submissions report every citation problem at once, one entry per fragment. A citation repeating an earlier citation's lines keeps that evidence: unchanged text stays, text that moved to one unique place is followed, and changed, ambiguous or unreadable text is reported with where it now is. The current text at the old lines is never signed in its place. action complete-current --preview also checks production-stage article files without saving anything.
  • Capture gaps. A synced block whose source document the identity cannot open (Lark code 3380004) is a permission gap, like an unreadable whiteboard: the document is saved and the gap listed, with how to close it (request the app scope on the Lark Open Platform, or ask the document's owner). Gap placeholders cannot be cited in revisions or production; a line that also holds captured text (a table row) can. Refreshing an unchanged revision saves the snapshot when a resource becomes a gap or a preview, and lists each downgrade; other failures still keep the old snapshot.
  • Repository readiness and long Git operations. The checkout check scales its time limit with the file count, takes no index lock and retries once; a check that cannot finish is reported as unchecked instead of making the source unavailable. Fetches and clones continue while Git's progress shows more objects or bytes, stop after about five minutes without progress, and stop and report after 30 minutes (previously a fixed two minutes). Reasons name the source and hide credentials.
  • Routes. Re-running prepare-current --input checks previously unreadable sources again, the refresh error's next command keeps --input, and prepare-current returns the next Route with the command's --managed mode. After delivery, a knowledge-map-only change routes to recording a patch version and building, also when it was committed first. version record refuses while drafts await review, unless the workflow itself reached version recording.
  • Messages and smaller fixes. A citation of a file the source does not own lists the files it owns; a source outside the task names the requirement to extend and every task the plan amendment must replace. source remove no longer counts declarations the project builds from the source registry (it loads the project once with the source hidden; hand-written declarations still block). context ... | head no longer crashes with EPIPE. The knowledge updates guide describes merging unpublished intermediate versions.

Compatibility

  • Behavior change: a production-stage resubmission that repeats an earlier citation whose text changed is now rejected with the change and a suggestion (previously the new text at the old lines was signed silently). Citations covering only a capture gap are rejected.
  • Behavior change: a same-revision Lark refresh that degrades a resource to a permission gap, missing source or preview now saves instead of refusing; the result lists lark.capture.resource-degraded.
  • New output only: one failure entry per citation problem, workflow on prepare-current, production preview result (context.production-submission-preview/v1), reason code version-review-pending. SDK: loadSourcesRegistry honours an in-process exclusion set by the CLI during source remove; workspaces on an older SDK keep the previous strict check. No new input fields, configuration or workspace format.

Verification

  • packages/context-cli: package test run reached 1472 passing before stopping, then each change's affected test files (137, 51 and 59 tests, all passing); every new test fails without its change. tsc --noEmit; bun run lint (0 errors, baseline warnings); bun run build:plugin (no changes).
  • Checked against a copy of the real integration workspace: unchanged status route and cost (≈1.9 s), EPIPE, navigation-only route after a committed note, and the gap rule on its 544 captured gap lines (505 rejected, 39 table rows with captured text citable).

Checklist

  • bun run verify:full passes. (Affected package tests locally; full verification runs in CI.)
  • 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. (Changed guides are English-only.)
  • Runtime code remains compatible with Node.js 20+.
  • No generated output, secrets, private sources, or local workspaces are included.

🤖 Generated with Claude Code

…idence, and unblock stuck routes

- Production-stage submissions report all citation problems, keep or follow repeated earlier citations, and support --preview; capture-gap placeholders cannot be cited.
- Synced blocks without access are permission gaps; same-revision refreshes save located downgrades; checkout checks scale with size; long fetches and clones run while they progress.
- prepare-current re-checks failed sources and returns the next Route; navigation-only changes after delivery route to version and build; version record waits for Review; clearer out-of-scope and unowned-path messages; source remove ignores registry-derived declarations; no EPIPE crash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit 3dce100 into main Nov 10, 2026
2 checks passed
@qiansc qiansc mentioned this pull request Nov 10, 2026
5 of 6 tasks
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