Current Scope (re-triaged 2026-06-06)
As part of #9904, implement the structural evidence relation that lets the Native Edge Graph answer:
Which durable test-file evidence validates this source node?
The accepted scope is the useful core of the old RLAIF framing: TEST/FILE -> VALIDATES -> CLASS.
The stale synthetic-suite reward-loop wording below is not branch authority.
Task
Add a first-class graph relation contract that connects concrete test-file evidence to structural source nodes, so TEST_GAP inference and later reward / gap-downgrade flows can query evidence structurally instead of parsing capabilityGap strings only.
Current source anchors:
ai/services/graph/GapInferenceEngine.mjs owns deterministic session-scoped TEST_GAP inference.
ai/daemons/orchestrator/services/DreamService.mjs delegates inferTestGapsFromSession() into GapInferenceEngine.
ai/services/memory-core/GraphService.mjs already supports typed graph edges via linkNodes(source, target, relationship, weight, properties).
- Existing test evidence is represented by graph
FILE nodes whose properties.path starts with test/; do not create duplicate TEST nodes for the same path unless the PR defines an alias/canonicalization rule.
Contract Ledger
| Target surface |
Source of authority |
Required behavior |
Edge case / fallback |
Evidence |
| Test evidence node |
Existing graph FILE nodes with path.startsWith('test/') |
Treat matching test-file nodes as canonical durable test evidence for this first implementation |
If a distinct TEST node is introduced, define aliasing to avoid duplicate test-path identity |
Unit test with one test path and one class node |
VALIDATES edge |
GraphService.linkNodes() |
Create FILE -> VALIDATES -> CLASS/METHOD/COMPONENT when deterministic test-file matching finds coverage |
Missing endpoints must not create hallucinated edges; internal config hooks stay excluded |
Unit test asserting edge creation and metadata |
TEST_GAP closure |
GapInferenceEngine.applyGapsToNode() |
Matching durable test evidence suppresses or removes [TEST_GAP]; missing evidence keeps [TEST_GAP] |
Weaker runtime evidence from #9890 may downgrade later, but does not equal permanent Playwright coverage unless explicitly promoted |
Regression test for gap present vs edge-created/gap-cleared |
| Downstream consumers |
#9905 / #9907 / #9890 |
Later producer and reward/downgrade work consumes this relation instead of inventing parallel gap state |
#9890 is adjacent and human-assigned; do not overwrite it in this lane |
PR body cites #9904 epic-review and this ledger |
Out Of Scope
- Do not implement the old blind Headless WebKit / synthetic
*.spec.mjs runner here.
- Do not implement pass/fail reward propagation here.
- Do not treat Neural Link action success as equivalent to permanent Playwright test coverage here.
References
Current Scope (re-triaged 2026-06-06)
As part of #9904, implement the structural evidence relation that lets the Native Edge Graph answer:
The accepted scope is the useful core of the old RLAIF framing:
TEST/FILE -> VALIDATES -> CLASS. The stale synthetic-suite reward-loop wording below is not branch authority.Task
Add a first-class graph relation contract that connects concrete test-file evidence to structural source nodes, so
TEST_GAPinference and later reward / gap-downgrade flows can query evidence structurally instead of parsingcapabilityGapstrings only.Current source anchors:
ai/services/graph/GapInferenceEngine.mjsowns deterministic session-scopedTEST_GAPinference.ai/daemons/orchestrator/services/DreamService.mjsdelegatesinferTestGapsFromSession()intoGapInferenceEngine.ai/services/memory-core/GraphService.mjsalready supports typed graph edges vialinkNodes(source, target, relationship, weight, properties).FILEnodes whoseproperties.pathstarts withtest/; do not create duplicateTESTnodes for the same path unless the PR defines an alias/canonicalization rule.Contract Ledger
FILEnodes withpath.startsWith('test/')TESTnode is introduced, define aliasing to avoid duplicate test-path identityVALIDATESedgeGraphService.linkNodes()FILE -> VALIDATES -> CLASS/METHOD/COMPONENTwhen deterministic test-file matching finds coverageTEST_GAPclosureGapInferenceEngine.applyGapsToNode()[TEST_GAP]; missing evidence keeps[TEST_GAP]Out Of Scope
*.spec.mjsrunner here.References