Fallback → telemetry bridge: log fallback reasons as GitNexus failure reports#6
Merged
Merged
Conversation
…failure report The classical-fallback escape hatch only recorded a COUNT (classicalFallbackGranted) plus a transient reason in the grant flag (expires / cleared). Now every `gitnexus:fallback` also appends a DURABLE report — the agent's reason + the graph state it distrusted (GN version, index size: nodes/edges/embeddings/processes, indexed commit + age) — to an append-only .gnkit/.gitnexus-fallback-log.jsonl, so the user can see WHERE GitNexus fell short and report it to the GN developers. - session-primer: appendFallbackReport / readFallbackReports / fallbackLogPath. - `npm run gitnexus:fallback-log` (+ `--json` to export for the GitNexus devs) lists the reasons with their graph context; `gitnexus:stats` shows a count + pointer. - Contract now asks for a SPECIFIC, actionable `<why>` (which tool, expected vs actual) since it's a bug report, not just a note. - Durable + append-only (survives session clear + compaction); gitignored (per-machine telemetry). 60/60 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The classical-fallback escape hatch only recorded a count (
classicalFallbackGranted) plus a transient reason in the grant flag (which expires / gets cleared). This turns each fallback into a durable "where did GitNexus fall short" report you can review and forward to the GN developers.What
gitnexus:fallback -- "<why>"appends a record to append-only.gnkit/.gitnexus-fallback-log.jsonl: the agent's reason + the graph state it distrusted — GN version, index size (nodes/edges/embeddings/processes), indexed commit + age.npm run gitnexus:fallback-loglists them with context;-- --jsonexports for the GN devs.gitnexus:statsshows a⚠ fallback reports: Npointer.<why>(which tool, expected vs actual — e.g.impact returned 0 callers for OrderService but grep finds 3) since it's a bug report, not a note.Durable (append-only; survives compaction + session clears), gitignored (per-machine telemetry). 60/60 tests.
🤖 Generated with Claude Code