Plan M4b: approvals over Mattermost in 15 tasks
Skeletons for new files only; existing files change by exact edits, so no task overwrites an earlier one's work. Each task's tests were run against a reference built in order from master, with the gate at each step and mutations checked; each skeleton compiles and fails its tests, and every todo!() comment was read beside its signature. The reference is kept off this machine. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# M4b task 03: `bxctl deny`, another name for `refuse`
|
||||
|
||||
**Branch:** `m4b` (run `git switch m4b`; `git status --short` must be empty, otherwise stop)
|
||||
**Commit subject:** `bxctl: deny, another name for refuse`
|
||||
|
||||
## Goal
|
||||
|
||||
In Mattermost the owner answers `!deny <id>`; in the terminal the word should work too. `bxctl
|
||||
deny` means exactly what `bxctl refuse` means, argument for argument, errors included.
|
||||
|
||||
## Files
|
||||
|
||||
- Copy: `crates/bxctl/tests/cli_deny.rs`
|
||||
- Modify: `crates/bxctl/src/cli.rs`, `docs/implementer-log.md`
|
||||
|
||||
## The changes, exactly
|
||||
|
||||
In `crates/bxctl/src/cli.rs`:
|
||||
|
||||
1. In `parse`, `"refuse" => parse_refuse(rest, home),` becomes
|
||||
`"refuse" | "deny" => parse_refuse(rest, home),`.
|
||||
2. In `USAGE`, after the two lines about `bxctl refuse`, add a blank line and:
|
||||
|
||||
```text
|
||||
bxctl deny <id> [--reason TEXT] [--admin-socket PATH]
|
||||
Another name for refuse.
|
||||
```
|
||||
|
||||
(keep the two-space and six-space indents of the lines around it).
|
||||
|
||||
## Steps
|
||||
|
||||
- [ ] **1. Copy.** `git switch m4b`, then `cp docs/plans/M4b/files/crates/bxctl/tests/cli_deny.rs crates/bxctl/tests/`
|
||||
- [ ] **2. See it fail.** `cargo test -p bxctl --test cli_deny`. Expected: 2 fail.
|
||||
- [ ] **3. Make the two changes.**
|
||||
- [ ] **4. See it pass.** `cargo test -p bxctl`. Expected: every suite passes; `cli_deny` 2 passed.
|
||||
- [ ] **5. Run the gate.** `cargo fmt --all`, then `make gate`. Expected last line: `gate: ok`.
|
||||
- [ ] **6. Log and commit.** `git add crates/bxctl docs/implementer-log.md Cargo.lock && git commit`
|
||||
|
||||
## Done when
|
||||
|
||||
- `cargo test -p bxctl` passes; `make gate` prints `gate: ok`.
|
||||
Reference in New Issue
Block a user