Fail-closed bot compliance on Legal API errors (#5) #27
No reviewers
Labels
No labels
agent:implement
agent:ready
api
bot
bug
ci
enhancement
ready
security
terra-classic
testing
ux
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-ecosystem-legal!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "5-bot-fail-closed-compliance-when-legal-api-errors-replace-unwrap-or-false-"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
bot/src/compliance.rs(ComplianceCheck::{SignedLatest, NotSignedLatest, Unknown}) so Legal API status errors never coerce to unsigned.handle_group_message,announce_terms_update,run_kicks, andhandle_member_joinedthroughclassify_status— Unknown holds DB state and skips kicks; structuredwarnlogs includechat_id/user_id/context.test:rust-botCI job, unit tests for the policy matrix, and agent skillskills/bot-enforcement/SKILL.mdwith README/gap cross-links.Closes #5
Acceptance criteria (from #5)
unwrap_or(false)on compliance status in enforcement/kick pathshandle_group_messagedoes not mark non-compliantrun_kicksdoes not ban/kickOk(true)clears;Ok(false)markscargo testforbot/Not in this MR (issue out of scope)
Test plan
cd bot && cargo test(8 passed)cd bot && cargo fmt --check && cargo clippy --all-targets -- -D warningsunwrap_or(false)onis_signed_latestinbot/srctest:rust-bot+lint:rust-botgreen on this MRCloses #5
restored source branch
5-bot-fail-closed-compliance-when-legal-api-errors-replace-unwrap-or-false-marked this merge request as ready
added 1 commit
90b3b797- Fail-closed bot compliance when Legal API status errors (#5).Compare with previous version
Local verification complete (
cd bot && cargo test→ 8 passed; clippy-D warningsclean). GitLab CI jobs on this MR are currently failing withci_quota_exceeded(not a code failure) — please re-run the pipeline when minutes are available, especiallylint:rust-botandtest:rust-bot.mentioned in issue #5
added 3 commits
main6470432a- Merge origin/main into MR !27; resolve security-ops skill conflictCompare with previous version
mentioned in commit
6470432a8ementioned in commit
9f45ac6e58