fix(prompt-hook): record high-tier gate telemetry only when context was actually injected (#1143) (#1149)
gate('high-keyword'/'high-token') sat outside the injection guard, so an
errored or empty codegraph_explore still counted as a HIGH-tier success.
The gate telemetry is the measured recall/precision funnel that decides
whether the tiered gate design survives — a delivery failure must degrade
it toward noop-*, not inflate the high tiers. Failures now record
noop-explore-keyword / noop-explore-token. Doc enum updated (including
the noop-vocab-empty outcome the #1142 fix adds next).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2f70eb3d32
commit
be55b93d02
@@ -1141,8 +1141,14 @@ program
|
||||
process.stdout.write(
|
||||
`<codegraph_context note="Structural context from CodeGraph for this prompt — treat returned source as already read; ${more}.">\n${body}${others}\n</codegraph_context>\n`,
|
||||
);
|
||||
gate(keyworded ? 'high-keyword' : 'high-token');
|
||||
} else {
|
||||
// A high-* outcome must mean context was actually delivered —
|
||||
// the funnel's noop-vs-high split is how gate recall is
|
||||
// measured (#1143). An explore error or empty result is a
|
||||
// delivery failure, not a gate success.
|
||||
gate(keyworded ? 'noop-explore-keyword' : 'noop-explore-token');
|
||||
}
|
||||
gate(keyworded ? 'high-keyword' : 'high-token');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user