feat(calibration): schedule the satisfaction-floor loosening tick with a one-shot apply alert#8175
Merged
Merged
Conversation
…h a one-shot apply alert (#8158) The #8121 narrow start shipped the backtest-gated loosening loop behind a manual internal trigger only. This puts it on the existing cron surface as a sibling of the selftune tick: enqueued hourly ONLY when SATISFACTION_FLOOR_AUTOTUNE_ENABLED is on (flag-OFF the enqueued set is byte-identical), with the same defense-in-depth flag re-check in the queue consumer so a stale in-flight job after a flag flip still no-ops. An APPLIED loosening emits ONE structured error-level alert on the same Workers-Logs + Sentry notify path runOpsAlerts documents (event satisfaction_floor_loosened, ev-fingerprinted, carrying the floors and split sample sizes) -- and cannot re-alert on later ticks by construction, since the next evaluation starts from the already-loosened floor. The tick itself fails safe: a thrown evaluation is logged and swallowed, never poisoning the queue. 100% line+branch coverage held on the run module; enqueue gating (on/off/ non-hourly), processor defense-in-depth, one-shot alerting, and both failure-formatting arms are all pinned. Closes #8158.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jul 23, 2026
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.
Summary
satisfaction-floor-looseningjob enqueued hourly as a sibling of theselftunetick, only whenSATISFACTION_FLOOR_AUTOTUNE_ENABLEDis on — flag-OFF (the shipped default) the enqueued set is byte-identical — with the same defense-in-depth flag re-check in the queue consumer so a stale in-flight job after a flag flip still no-ops.event: satisfaction_floor_loosened,ev-fingerprinted per the runOpsAlerts convention, carrying both floors and split sample sizes). One-shot by construction: the next tick evaluates from the already-loosened floor and returnsno_proposal. The tick itself fails safe — a thrown evaluation is logged (satisfaction_floor_loosening_tick_failed) and swallowed, never poison-pilling the queue.Closes #8158
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:testnpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ciran with 1110 test files passed and exactly two failures, both environmental and both since resolved: (1)codecov-policy.test.ts— broken on main itself by fix(ci): don't fail scoped test selection when zero test files match #8167 (fixed with the completed escape hatch in fix(ci): carry the no_tests_matched escape through every coverage/results upload step #8173); (2)miner-package-skeleton.test.ts— an artifact of a symlinked node_modules in the build worktree; re-ran green (6/6) after a realnpm ci. The changed run module holds 100% line AND branch coverage (16 tests incl. one-shot alerting, both failure-formatting arms, and processor defense-in-depth); enqueue gating (default/on/off/non-hourly) is pinned in the scheduler suite.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.The alert carries floors and sample counts only. All autonomy remains double-gated (env flag at enqueue AND dispatch).
UI Evidence
Not applicable — no UI change.
Notes
codecov-policyon main for every branch, this one included).