Repository navigation
feat(status): write 0 for unreported interfaces (#12) - #14
Merged
Merged
Conversation
When a backend was down, or a running backend stopped reporting an interface such as a removed Xray inbound, that interface left usher.prom. Its users could not be managed, yet no series read 0, so usher_interface_up == 0 stayed silent and operators kept one absent() term per interface name by hand. writeStatus now writes usher_interface_up 0, with no user series and no Stats call, for each interface that usher.yml references and no open backend reports. It decides "reported" from the same owners map that logUnknown uses. Reported interfaces keep their current lines, and an unreferenced interface of a down backend is still absent. The operator docs drop the per-interface UsherInterfaceAbsent rule: three rules with no interface names now cover the file. Co-Authored-By: Claude Opus 5.5 (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.
When a backend was down, or a running backend stopped reporting an interface (a removed Xray inbound), the interface left
usher.prom. No series read 0, sousher_interface_up == 0stayed silent, and the Alerts section indocs/operations.mdneeded oneabsent()term per interface name.writeStatusnow writesusher_interface_up 0, with no user series and noStatscall, for each interface thatusher.ymlreferences and no open backend reports. It decides "reported" from the sameownersmap thatlogUnknownuses. An unreferenced interface of a down backend is still absent; it has no users. The docs dropUsherInterfaceAbsentand keep three rules with no interface names. They also state that 0 means "the last pass did not apply it", not "users cannot connect", and that the log names no cause for an unreported interface while another backend is down.Closes #12
Verified:
go test -race ./...andscripts/format.shpass. The branch'sinternal/pass/pass_test.gorun against979b987fails six status tests,TestRunStatusBackendDownamong them; on this branch all pass.Per-task commits before collapse
🤖 Generated with Claude Code