Repository navigation
agent: remove the unused finding traffic guidance constant - #455
Merged
BaaRai merged 1 commit intoNov 22, 2026
Merged
Conversation
Owner
|
Thanks @NikolayGusev-astra, merged. The dead constant is gone and the AST regression test keeps it from coming back. |
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.
Problem
findingTrafficGuidanceinagent/finding_recorder.gois an unreferenced constant:grep -rn findingTrafficGuidance --include='*.go' .returns only its own declaration. Its comment says the text is appended to the prompt, but the text an agent actually receives is assembled infindingWorkflowTools— a different, longer contract that has since moved on (capture-off notes, per-tool notes). Two texts describing the same thing, one of them dead, is exactly the place where the next reader edits the wrong one.Found while running ARTEX against a live target: the guidance area is where the agent looks for the binding contract, and this constant no longer takes part in it.
Changes
Remove the unused constant and its comment. No prompt assembly and no runtime behaviour change.
Add a source-level regression test: restoring an unused declaration cannot change prompt output, so the test parses
finding_recorder.goand fails when the name comes back. Without it the constant can silently reappear (a merge of the old file, a revert) and nobody notices.Verification
TestFindingRecorderHasNoLegacyTrafficGuidancefails naming the constant; green after restoring the fix.go test ./agent/ -count=1withARTEX_PG_DSNpointed at a local PostgreSQL.gofmt -l agent/ server/andgit diff --checkclean.Alternative considered
Keeping the constant and wiring it into the prompt instead. It overlaps with the per-tool notes added in #448 and with the binding-off notes in #453 (same file family, no conflict), so removal keeps one text per contract. Happy to wire it in instead if you prefer that direction.
Noticed while running the platform on a live target; both PRs come from the same run.