Skip to content

Fix incremental skill evidence and distinguish reads from searches - #2842

Merged
HypForge merged 2 commits into
masterfrom
fix/skill-graph-evidence
Oct 29, 2026
Merged

HypForge merged 2 commits into
masterfrom
fix/skill-graph-evidence

Conversation

@bgmcmullen

Copy link
Copy Markdown
Contributor

Summary

A session that first read a skill file and later requested the skill could keep only the original evidence because projection skipped existing edge IDs. Merge later skill evidence into the existing relationship while preserving earlier evidence during partial source scans.

Distinguish file reads (dispatch_file_read) from searches (dispatch_shell_search). Display skill relationships as evidence, with explicit request/read/search labels, rather than implying execution with ran. Keep old dispatch_shell_read flags visibly unverified until an explicit full-source graph project --refresh replaces them. Skill and File nodes already coexisted; this does not introduce duplicate nodes.

Includes regression coverage through projection, storage, SQL, and neighbor rendering; updates query guidance and adds LLP 0564. The broader experimental parser is not included.

Validation

  • 419 graph tests pass.
  • 105 research parser/evidence tests pass (research harness is outside this repository).
  • context_graph_projects_rows smoke passes.
  • Full suite: 9,001 passed, six skipped, six sandbox-related platform failures. All tests in the two affected files pass when rerun outside the sandbox.
  • Typecheck remains blocked by dependency-type conflicts between the installed squirreling versions in unmodified Parquet-query files; no errors remain in changed files.
  • Local refresh verified: all old dispatch_shell_read flags removed, 348 skill relationships preserved, 156 carrying file-read evidence and two also carrying search evidence.

Performance and rollout

No new dependencies. Shell operands are parsed once per action and cached only for the current source row. Existing skill relationships require an additional streaming edge-table scan; changed relationships require a conditional partition rewrite. Unchanged evidence does not rewrite partitions. Server-scale performance has not been measured.

Default projection merges evidence without removing old flags. Historical label cleanup requires an explicit full-source refresh. A daemon restart alone does not replace the flags. No server deployment or remote backfill has been performed.

@bgmcmullen bgmcmullen added the neutral:adopt Foreign PR adopted into neutral's reconcile scope label Oct 29, 2026
@HypForge HypForge added the neutral:adopted Adoption completion record: merged while carrying neutral:adopt (LLP 0031) label Oct 29, 2026
A partition can hold two copies of one edge id until compaction folds
them. The merge replaced the id with whichever copy it saw last, then
dropped every copy, so evidence held only by the other copy was lost.
Fold each copy into one replacement row instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HypForge

Copy link
Copy Markdown
Contributor

Final review (R2) at d0f62fd: LOW, clean.

  • R1 found one LOW issue, fixed in d0f62fd. A partition can hold two copies of one edge id until compaction folds them. The evidence merge kept whichever copy it saw last and dropped both, so flags held only by the other copy were lost (against LLP 0564's "preserve earlier evidence"). The merge now folds every copy into one row. A new test covers both orders and fails without the fix.
  • Checked: graph tests 388/388, context_graph_projects_rows smoke ok, typecheck clean. LLP 0564 is free, and the 0023 and 0428 edits are forward-refs only. Only ai-gateway-graph emits ran edges, all to Skill, so the "skill evidence" label cannot mislabel another edge type. graph.md is unchanged by us.
  • CPU and memory, per projection pass (daemon: at most every 5 minutes, and only when the source changed or a spool is pending):
    • Rows scanned: one more streaming scan of every edge row, on top of the existing full source scan and edge-id scan. Linear in edge rows; same cost class as today.
    • Memory: the matched skill rows (already held as derived edges), plus per-partition maps of matched ids, released after each partition.
    • Partitions rewritten: 0 at steady state; unchanged evidence causes no rewrite, which the test asserts. Each partition with a legacy dispatch_shell_read edge is rewritten once after upgrade. After that, a partition is rewritten only when one of its skill edges gains a flag: at most once per pass, and at most five times per edge in its life. A rewrite copies the whole partition. That is the bounded cost LLP 0564 accepts. Server-scale timing was not measured.
    • The operand parse cache keeps only the current source row.
  • Server-suite gate not triggered (graph plugin, verb text, tests and docs; no CLI command, MCP codec, tool schema, error code, contract.js or kernel type change).
  • Checks green at this head: CI run 40961707947, llp-check run 40961707800.

@HypForge
HypForge added this pull request to the merge queue Oct 29, 2026
Merged via the queue into master with commit bdf6cbc Oct 29, 2026
9 checks passed
@HypForge
HypForge deleted the fix/skill-graph-evidence branch October 29, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

neutral:adopt Foreign PR adopted into neutral's reconcile scope neutral:adopted Adoption completion record: merged while carrying neutral:adopt (LLP 0031)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants