Finish the vault graph rebuild after the graphify update #1540
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#1540
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 dates from 2026-07-31, and 171 of 331 non-journal notes are not in it. A stale lock blocked each SessionStart rebuild from 2026-08-01. A deliberate hold lock now blocks rebuilds. The stale-lock fix on branch
fix-vault-rebuild-stale-lockis not merged, because a merge alone releases the hold after 24 hours and starts a rebuild in each session with a context size that fails.Observed
On 2026-11-04, a rebuild ran 67 minutes and reached chunk 6 of 10. 42 of 82 Ollama requests returned invalid JSON, and 4 requests failed at the 600 second client timeout.
plugins/os-vault/config.yaml:9setsGRAPHIFY_OLLAMA_NUM_CTX: "8192". The model has num_ctx 16384. Chunks reach about 20,431 tokens. Graphify saves semantic results only at the end of a run, so the stop saved nothing.vault-rebuild.stamphas never existed, so without a lock each session starts a rebuild. Graphify is 0.8.31. The latestgraphifyyis 0.9.102.Reproduce
n/a: the hold lock blocks rebuilds, and a rebuild takes over one hour on the GPU.
Approach
Do this work in one sitting, and do not merge the branch alone.
Required work:
plugins/os-vault/config.yaml, with a fitting token budget and API timeout — check: absentGRAPHIFY_OLLAMA_NUM_CTX: "8192"inplugins/os-vault/config.yamlfix-vault-rebuild-stale-lock(commit7d4d01a6) — check: presentLOCK_MAX_AGE_SECONDSinplugins/os-vault/hooks/session_start.pyOrchestrator work: update
graphifyywithoutgraphify claude install, because that command restores the old rule and hooks. Confirm that the semantic cache survives the update. Excludejournal/with a vault.graphifyignore. Runbin/refresh-plugins. Delete the hold lock~/.cache/graphify/vault-rebuild.lock. Rebuild. Re-run the 10 question cc-os test set; the limit is 7 of 10. Reviewplugins/os-sdlc/skills/ticket-takedown/references/researcher.mdline 19,~/.claude/skills/graphify/SKILL.md, and the docs/graphify anchor on v0.8.31.Acceptance criteria
convention/graceful-rate-limits-automation-standard.md.Origin
~/.cache/graphify/vault-rebuild.lockon purpose to hold rebuilds.plugins/os-vault/hooks/session_start.py:121) ← no age check on the lock. DESIGN. Separately: rebuild output invalid ← prompts cut at 8,190 tokens ←plugins/os-vault/config.yaml:9. DESIGN.VERDICT: CREATE
Work has started on branch fix-vault-rebuild-stale-lock (worktree cc-os-fix-vault-rebuild-stale-lock). Changes stay uncommitted for review.
Branch ticket-1545 contains fix-vault-rebuild-stale-lock and adds a third rebuild step, graphify update --force (#1545). When this ticket ships, merge ticket-1545 and run bin/wikilink_recall.rb on the rebuilt graph. Target: at least 95% on the 103 links.
Measured state, 2026-11-05, session b10276a0. The same harness graded baseline and final. Vault: original questions 9 to 12 of 12, reworded questions 8 to 8 of 13, linked pairs found 9 to 21 of 30, largest component 37.3% to 56.7%, direct wikilink edges 168 to 411 of 649. cc-os: question set 3 to 5 of 10 (limit 7). Changes:
graphify update --forceon both live graphs, and commitsbc2f801fand57d4beff. The forced update, not the ignore change, raised the cc-os score. cc-os side effect: nodes with no source file rose from 22 to 411, and edges with a missing source file rose from 48 to 634. Not done: re-extraction of the 123 older notes. Branch ticket-1545 is not merged, so a scheduled rebuild does not run this step.Predicted ruling (ruling 16 in
docs/decisions/rulings.tsv, confidence 74). Jared can correct it. Ticket #1569 holds the full ruling.The vault part of this ticket uses the 12 vault questions, on the vault graph. Pass rule: the expected note appears in the
graphify queryoutput, graded by the harness. Home:plugins/os-vault/eval/graph-retrieval/.The "10 question cc-os test set" in the Approach is a separate check on the cc-os code graph, at limit 7 of 10. It does not score the vault graph.
The 12 alone do not prove graphify is ready. The 13 reworded questions and the facts-in-output count stay as tracked scores.
Measured state after the #1545 fix, 2026-11-05, session b10276a0. Live vault graph: 1686 nodes, 1814 edges. Original questions 12 of 12, reworded 8 of 13, facts in output 0 of 11 questions (4 of 25 facts), linked pairs 25 of 30, control pairs 18 of 30, largest component 61.9%, isolated nodes 147 (131 before the fix, 159 at baseline). Wikilink recall on the 103-link sample 100 of 103. Criterion 2 passes: two n8n query wordings return convention/graceful-rate-limits-automation-standard.md. Criteria 1 and 3 need a completed rebuild with the current settings. That rebuild is the re-extraction, which waits for the unsloth 9B default, so #1540 cannot close first. Branch ticket-1545 is not merged: a trial merge conflicts in docs/decisions/rulings.tsv and test_session_start_rebuild.py, and session 5d12673e proposes a Ruby port of session_start.py.
Session 47ffa777, 2026-11-05. The SessionStart hook on main started a rebuild of the live vault at 12:53:11 local. The hook had no stamp and no lock, and the script on main has no #1545 wikilink steps. I stopped the run about 3 minutes later, before it saved a result (graph.json mtime is still 11:11). Reasons: ruling 17 (merge #1545 before re-extraction) and ruling 20 (no GPU time approved). A separate eval of session 7cfd6b00 kept running. I recreated ~/.cache/graphify/vault-rebuild.lock at 12:55 as a hold. LOCK_MAX_AGE_SECONDS is 86400, so the hold ends on 2026-11-06 at 12:55. After that time, each new session starts this rebuild again, until #1545 merges or a stamp exists. Delete the lock when the re-extraction is approved.
Session 47ffa777, 2026-11-05. Main now holds ticket-1545 and the eval harness (
81da4e95). Started the manual re-extraction with V4 on llama.cpp, Jared approved. Scope: 124 older notes plus 13 with no cache entry. Backup: ~/.local/share/os-vault-eval/reextract-20261105/. The hold lock stays until the run ends.Resolution
Done: Settings, stale-lock fix, graphify update, and ignore rules are on main. Manual re-extraction of 136 notes on Unsloth 9B V4 finished, stamp written, hold lock removed. The extract step needed --allow-partial: the shrink guard refused because the run replaces old nodes by design (mean nodes per older note 1.33 to 8.33; no zero-node note).
Evidence: AC1: 66 of 66 chunks parsed, 0 timeouts, 0 capped, 3058 s. AC2: 'n8n 429 retry backoff rate limit' and the full-sentence wording return convention/graceful-rate-limits-automation-standard.md; the three-word 'n8n 429 backoff' does not, on the old graph or the new one. AC3: _needs_rebuild returns False with the stamp. Harness in
e618e9ac: original 12/12, reworded 8/13, facts 3/25 (was 4), linked pairs 22/30 (was 25), control 17/30 (was 18), isolated nodes 305 (was 147), largest component 53.7% (was 61.9%), cc-os 5/10 (limit 7, not met; separate check under ruling 16). Backup: ~/.local/share/os-vault-eval/reextract-20261105/.Follow-ups: Hook switch: #1576, llm-stack#22. Duplicate nodes and hubs: #1568, #1570. Facts in output: #1571. The cc-os 5/10 score and the isolated-node rise go to the graphify sign-off report; dropped as a separate ticket.
Correction after analysis (
4ebd2401,plugins/os-vault/eval/graph-retrieval/diff-reextract.md). Linked pairs 25 to 22 is a false drop: 30/30 direct edges in both graphs (#1578). Most of the isolated-node rise is a defect of the re-extraction: 95containsedges lost (#1577). Control pair losses are noise removed.