Repository navigation
Hold on a missing verdict instead of reloading - #3
Merged
Merged
Conversation
The example treated an empty classification as safe to auto-reload. The server returns "" when it could not classify a change at all — an unreachable or misconfigured embedding endpoint, say — and publishes anyway, because the version is durable and the verdict is only advisory. So "" does not mean "safe"; it means nobody checked. Treating it as safe inverts the gate exactly when it matters: the moment the safety check breaks, every change sails through unreviewed, and the log looks identical to a run of harmless edits. A forged notification carries no verdict either. It now fails closed, and says which case it is hit rather than the bare "needs review", so an operator can tell "this edit is risky" from "the classifier is down". Also: the agent could not authenticate. It built its client with no token, so it could only ever talk to a server running open — while the whole point of the example is to stand in for a production agent. It now reads PRIOMPT_TOKEN. Verified against a live server, all three paths: a minor edit reloads, a structural edit holds, and with the embedding endpoint unreachable the empty verdict holds and keeps serving the previous version.
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.
AUTO_RELOADincluded"", so the example agent hot-reloaded when the server returned no classification.The server returns
""when it could not classify the change at all — an unreachable or misconfigured embedding endpoint — and publishes anyway, because the version is durable and the verdict is advisory. So""does not mean safe; it means nobody checked.Treating it as safe inverts the gate precisely when it matters: the moment the safety check breaks, every change sails through unreviewed and the log looks like a run of harmless edits. A forged notification carries no verdict either.
Now fails closed, and distinguishes "this edit is risky" from "the classifier is down" so an operator can act on the right one.
Also adds
PRIOMPT_TOKEN— the agent built its client with no token, so it could only talk to a server running open, while the point of the example is to stand in for a production agent.Verified live, all three paths: minor edit → reload, structural → hold, embedder unreachable → hold and keep serving the previous version.