Finish the vault graph rebuild after the graphify update #1540

Closed
opened 2026-11-04 14:43:58 +00:00 by jared · 9 comments
Owner

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-lock is 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:9 sets GRAPHIFY_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.stamp has never existed, so without a lock each session starts a rebuild. Graphify is 0.8.31. The latest graphifyy is 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:

  1. Set the context size to 16384 in plugins/os-vault/config.yaml, with a fitting token budget and API timeout — check: absent GRAPHIFY_OLLAMA_NUM_CTX: "8192" in plugins/os-vault/config.yaml
  2. Merge fix-vault-rebuild-stale-lock (commit 7d4d01a6) — check: present LOCK_MAX_AGE_SECONDS in plugins/os-vault/hooks/session_start.py

Orchestrator work: update graphifyy without graphify claude install, because that command restores the old rule and hooks. Confirm that the semantic cache survives the update. Exclude journal/ with a vault .graphifyignore. Run bin/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. Review plugins/os-sdlc/skills/ticket-takedown/references/researcher.md line 19, ~/.claude/skills/graphify/SKILL.md, and the docs/graphify anchor on v0.8.31.

Acceptance criteria

  1. Given the merged fix and the new settings, when a rebuild finishes, then under 25% of requests return invalid JSON and no request times out.
  2. Given the rebuilt graph, when a session queries n8n 429 backoff, then the output names convention/graceful-rate-limits-automation-standard.md.
  3. Given a completed rebuild, when the next session starts within 7 days, then no rebuild starts.

Origin

  • Trigger: audit of memsearch, os-vault and Graphify use on 2026-11-04.
  • Improvised this session: recreated ~/.cache/graphify/vault-rebuild.lock on purpose to hold rebuilds.
  • Chain: vault graph stale ← rebuild killed on 2026-08-01 left a lock (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.
  • Root candidate: none found; searched graphify, vault, rebuild, stale-lock, num_ctx, os-vault session_start, vault-rebuild.lock
  • Where: plugins/os-vault/config.yaml, plugins/os-vault/hooks/session_start.py
  • Session: a877275b-6151-43a9-a1ca-db9e17fa32fc
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a877275b-6151-43a9-a1ca-db9e17fa32fc.jsonl

VERDICT: CREATE

## 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-lock` is 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:9` sets `GRAPHIFY_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.stamp` has never existed, so without a lock each session starts a rebuild. Graphify is 0.8.31. The latest `graphifyy` is 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: 1. Set the context size to 16384 in `plugins/os-vault/config.yaml`, with a fitting token budget and API timeout — check: absent `GRAPHIFY_OLLAMA_NUM_CTX: "8192"` in `plugins/os-vault/config.yaml` 2. Merge `fix-vault-rebuild-stale-lock` (commit 7d4d01a6) — check: present `LOCK_MAX_AGE_SECONDS` in `plugins/os-vault/hooks/session_start.py` Orchestrator work: update `graphifyy` without `graphify claude install`, because that command restores the old rule and hooks. Confirm that the semantic cache survives the update. Exclude `journal/` with a vault `.graphifyignore`. Run `bin/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. Review `plugins/os-sdlc/skills/ticket-takedown/references/researcher.md` line 19, `~/.claude/skills/graphify/SKILL.md`, and the docs/graphify anchor on v0.8.31. ## Acceptance criteria 1. Given the merged fix and the new settings, when a rebuild finishes, then under 25% of requests return invalid JSON and no request times out. 2. Given the rebuilt graph, when a session queries n8n 429 backoff, then the output names `convention/graceful-rate-limits-automation-standard.md`. 3. Given a completed rebuild, when the next session starts within 7 days, then no rebuild starts. ## Origin - Trigger: audit of memsearch, os-vault and Graphify use on 2026-11-04. - Improvised this session: recreated `~/.cache/graphify/vault-rebuild.lock` on purpose to hold rebuilds. - Chain: vault graph stale ← rebuild killed on 2026-08-01 left a lock (`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. - Root candidate: none found; searched graphify, vault, rebuild, stale-lock, num_ctx, os-vault session_start, vault-rebuild.lock - Where: plugins/os-vault/config.yaml, plugins/os-vault/hooks/session_start.py - Session: a877275b-6151-43a9-a1ca-db9e17fa32fc - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a877275b-6151-43a9-a1ca-db9e17fa32fc.jsonl VERDICT: CREATE
Author
Owner

Work has started on branch fix-vault-rebuild-stale-lock (worktree cc-os-fix-vault-rebuild-stale-lock). Changes stay uncommitted for review.

Work has started on branch fix-vault-rebuild-stale-lock (worktree cc-os-fix-vault-rebuild-stale-lock). Changes stay uncommitted for review.
Author
Owner

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.

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.
Author
Owner

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 --force on both live graphs, and commits bc2f801f and 57d4beff. 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.

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 --force` on both live graphs, and commits bc2f801f and 57d4beff. 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.
Author
Owner

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 query output, 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.

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 query` output, 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.
Author
Owner

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.

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.
Author
Owner

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. 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.
Author
Owner

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.

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.
Author
Owner

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.

## 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.
jared closed this issue 2026-11-05 20:28:27 +00:00
Author
Owner

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: 95 contains edges lost (#1577). Control pair losses are noise removed.

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: 95 `contains` edges lost (#1577). Control pair losses are noise removed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1540
No description provided.