Make the vault rebuild finish unattended when notes are hollow or old nodes are gone #1557
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1557
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The vault graph rebuild cannot finish unattended in two cases. A note can produce no nodes (a hollow note). A node from a note that was deleted or excluded on purpose can make a guard refuse the write.
Observed
Found during #1540. Data from 2026-11-04, graphify 0.9.102, model qwen3.5:9b.
The SessionStart run took 74 minutes and exited 1.
graph.jsonstayed unchanged. The hook wrotevault-rebuild.failed.13 of 205 notes produced no nodes. Graphify logged "chunk of N still hollow after 3 attempt(s)". Retries in a chunk returned identical
output_tokens, so same-size retries appear deterministic. A smaller--token-budgetrecovered notes: 4000 left 13 hollow, 2000 left 4, 800 left 2.The hook detects failure with
grep -Eq "chunk [0-9]+/[0-9]+ failed"in_REBUILD_SCRIPT. That pattern matched 0 lines although notes were lost. If extract exits 0 with hollow chunks, the hook writes the stamp and the lost notes stay out until the next rebuild.Two guards refused the write. The first is the incomplete-and-smaller guard in
graphify/cli.py. The second isto_jsoningraphify/export.py, which calls_lost_saved_semantic_nodeswith an emptydeleted_sources. It listed nodes fromjournal/, which.graphifyignorenow excludes on purpose.Code reading (not run) shows the second guard fires on any later deleted or excluded note, even on an otherwise complete run. Each such rebuild would then fail until someone passes
--allow-partial. Confirm this by a run.The orchestrator wrote the graph by hand with
--allow-partial --token-budget 800, then cluster-only, then wrote the stamp. Ingraphify/cli.py(_stamped_manifest_files), a file with no output has no manifest stamp, so the next run re-queues it. A file whose output shrank (unverified_semantic_sources) is excluded from stamping unless--allow-partialis set. With--allow-partialit is stamped and will not be retried until it changes. Confirm which case applies to the missing notes:reference/gitignore-trailing-slash-does-not-match-symlinks.md2026-06-08-graphify-ingesting-code-ast.md2026-06-08-graphify-ingesting-docs-knowledge.mdReproduce
Run on the 2026-11-04 vault state. Expect "still hollow after 3 attempt(s)" lines and exit 1.
Approach
The hook detects hollow notes, retries them with a smaller token budget, and handles intended exclusions without a manual flag.
Required work:
still hollowinplugins/os-vault/hooks/session_start.py--token-budget 800inplugins/os-vault/hooks/session_start.pyOrchestrator work: verify the exclusion guard and stamping behavior against graphify 0.9.102. Decide how the hook handles intended exclusions without a manual flag.
Acceptance criteria
--token-budget..graphifyignoreafter the last graph write, when a rebuild is otherwise complete, then the graph is written without a manual flag.Owner sketch
Origin
--allow-partial --token-budget 800, then cluster-only, then wrote the stamp._lost_saved_semantic_nodesguard refused ← 13 hollow notes and journal/ nodes now excluded ← hook retries at the same token budget and does not detect "still hollow" (_REBUILD_SCRIPT). DESIGN; graphify 0.9.102 for the guards (UPSTREAM-TOOL).VERDICT: CREATE