Real factory example · captured NeoDash results
Adding runner token usage to observability
I want to add details about token usage on the runners to the observability system. What subsystems are affected? When was this last modified, and why?
Split the question into claims.
- Locate the code that reads runner usage.
- Find its reviewed subsystem membership.
- Trace production callers and static test candidates.
- Read the surviving-line history and look for rationale.
- State gaps before handing the result back.
Locate the implementation.
MATCH (f:Function {
repository_id: $repository, module_name: $module, qualified_name: $target
})
MATCH (f)-[:SUPPORTED_BY]->(span:SourceSpan)
OPTIONAL MATCH (sub:Subsystem)-[:CONTAINS]->(m:Module {
repository_id: $repository, module_name: $module
})
RETURN f.qualified_name AS function, f.path AS path,
f.start_line AS start_line, f.end_line AS end_line,
collect(DISTINCT sub.name) AS subsystems,
collect(DISTINCT span.locator) AS evidence,
f.id AS source_node| function | path | start line | end line | subsystems |
|---|---|---|---|---|
| parse_usage_from_log | yesod/src/yesod/dispatcher/usage.py | 119 | 153 | factory, dispatcher |
This establishes static location and reviewed taxonomy membership. It does not establish the complete observability data path.
Ask when those surviving lines entered the code.
MATCH (f:Function {
repository_id: $repository, module_name: $module, qualified_name: $target
})
MATCH (commit:Commit)-[touch:TOUCHES]->(f)
WHERE touch.join = 'git-blame-current-line'
OPTIONAL MATCH (commit)-[:TOUCHES]->(note:Note)
RETURN commit.object_id AS commit, commit.committed_at AS committed_at,
note.natural_key AS note_id, note.title AS note_title,
note.status AS recorded_status, touch.surviving_line_count AS surviving_lines,
commit.evidence_json AS commit_evidence, note.evidence_json AS note_evidence
ORDER BY committed_at DESC, commit, note_id LIMIT $limit| commit | committed at | surviving lines |
|---|---|---|
| b6ad1ffe3597e05be49d80ea95079fbc399cddd6 | 2026-06-11T01:55:49+00:00 | 35 |
No note was directly linked to this function's contributing commit. The date describes surviving blamed lines, not every later edit or a deployment.
Trace callers, tests and adjacent history.
MATCH (f:Function {
repository_id: $repository, module_name: $module, qualified_name: $target
})
MATCH (caller)-[call:CALLS]->(f)
RETURN caller.module_name AS module, caller.qualified_name AS caller,
caller.path AS path, caller.start_line AS line,
call.evidence_json AS evidence
ORDER BY module, caller LIMIT $limit| caller | path | line |
|---|---|---|
| Runner._record_run_usage | yesod/src/yesod/runner.py | 7006 |
| Runner._sample_input_tokens | yesod/src/yesod/runner.py | 7419 |
Show 7 static test candidates
| selector | basis | certainty |
|---|---|---|
| yesod/tests/test_run_usage.py::test_parse_log_binary_garbage_yields_none | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_empty_file_yields_none | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_finds_result_among_stream_lines | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_huge_log_still_finds_tail_result | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_last_result_wins | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_missing_file_yields_none | static_ast | inferred |
| yesod/tests/test_run_usage.py::test_parse_log_plain_text_yields_none | static_ast | inferred |
MATCH (f:Function {
repository_id: $repository, module_name: $module, qualified_name: $target
})
MATCH (caller)-[:CALLS]->(f)
WHERE caller.path STARTS WITH 'yesod/src/'
MATCH (commit:Commit)-[touch:TOUCHES]->(caller)
WHERE touch.join = 'git-blame-current-line'
MATCH (commit)-[:TOUCHES]->(note:Note)
RETURN caller.qualified_name AS caller, commit.object_id AS commit,
commit.committed_at AS committed_at, note.natural_key AS note_id,
note.title AS note_title, note.evidence_json AS evidence
ORDER BY committed_at DESC, commit, caller, note_id LIMIT $limit| caller | commit | committed at |
|---|---|---|
| Runner._sample_input_tokens | 1d80c73dc7a0d273245ad20bf1a5255c30b9c7f4 | 2026-06-03T14:13:56-07:00 |
The follow-up found adjacent planning context but no direct rationale. Its private note metadata is omitted, and the graph agent does not promote it into an explanation of the parser.
Graph agent → coding agent
A bounded answer
Start at yesod.dispatcher.usage.parse_usage_from_log. The reviewed graph places its module in the factory and dispatcher subsystems. Production callers in yesod.runner record run usage and sample input tokens; the graph also returns 7 inferred test candidates.
The surviving implementation lines trace to b6ad1ffe3597e05be49d80ea95079fbc399cddd6, committed 2026-06-11T01:55:49+00:00. This capture does not establish why the parser changed, the exporter that consumes every token field, current deployed behavior, or the complete affected-subsystem set.
Next read-only checks: refresh at the planning revision; establish which component writes each token field; trace telemetry exporters; inspect the listed tests and deployment receipts.
Evidence receipt
- Factory capture
- e86c4e0fbaf512d1c6b5764d476c58142b06b089d52c79639ab95422db8afb0b
- Graph source digest
- 9aa1d439fbd7c1ab6a986decb739b40df86564684942c94824ed75a96080e6f4
- Compared source commit
- 80c26c8e9f03ffe9c71859e61b90cda814980b26
- Captured
- 2026-09-11T00:07:13.265599+00:00
- Gallery revision
- cec4fc7fae81a642debb23538a7acb3ecdf92e73
- Execution label
- protected NeoDash query; reviewed captured result shown here
- Remote model calls
- 0