Repository navigation
fix: report processor-off and prune removed markdown - #67
Merged
Merged
Conversation
Report the processor kind on /health and log once at startup when distillation is off. Add opt-in markdown --prune and context doc remove so dropped files leave search and read without a new MCP tool. Co-authored-by: Nick Kosarev <nick@kosarev.space>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/healthincludesprocessor:"off","openai", or"codex". The body has no model name and no key. When distillation is off, startup writes one stderr JSON line that this is a supported mode, including a curated instance. There is nocontext statuscommand, so none was added.context import markdown --pruneretires markdown sources for the same area, project, and import directory whose relative path is gone. The summary field isremoved. The source row stays in the database. Search, timeline, and read skip it. Importing the file again makes it visible.context doc remove <doc:project:type:key or source id>is an owner CLI command. A document id, or a source id that belongs to a document, retires every revision of that document. MCP stayssearch,remember,read, andtimeline.Tests
pnpm run check(lint, typecheck, andpnpm test): 54 files, 277 tests passed.Friction
store.search,packageCandidates,selectMemory, embedding#chunkFrom, the document current/stale SQL, and distill each readsourceson their own. A retire flag that misses one of those leaves the page searchable, andfindMaterialthrowsMissing source candidateif the SQL and the read path disagree. That was reading time, not a wait. Node install, pnpm install, and the full suite were about 4s, 4s, and 26s.console.warnon stderr, not a second stdout line.test/backup-cli.test.tsdoesJSON.parse(output.trim())on the whole stdout, andtest/restart.test.tsparses the first stdout chunk as one JSON object. A normal info line on stdout fails those tests. The import root is stored inmarkdown_import_roots, outside the import fingerprint, because putting it in provenance metadata would mark every unchanged fileupdated. Sources imported before this change have no root, so the first--prunein that area and project treats them as part of the folder. Retirement is asource_retirementsrow, not the spec's hard-delete journal. That journal is still unbuilt, and wiping text plus derived items was more than this slice.test/backup-cli.test.tstreats every stderr JSON event that is notbackupas exactlyembeddings_unavailable, so the startup line had to be allow-listed.test/restart.test.tswaitForPortassumes one JSON document on stdout. There is nocontext status.docs/spec.mdstill describes hard delete as unbuilt; this path keeps the source text and only hides it from search and read.event === "listening") instead ofJSON.parseof the whole stdout buffer, and stderr assertions should ignore unknown events. A short list indocs/architecture.mdof the queries that define "searchable" would have cut the tracing.Merge and deploy still need a separate owner approval.