Commit 526f0a2
committed
fix(mcode-island): correct README drift and lock PermissionRequest decision
Two follow-up changes in response to the hetaoBackend review on
PR #21 ("Request changes"):
1. README.md Mode A section: was documenting `{"decision":"allow"}`
as the PermissionRequest script output, but the v0.3.0 script
emits `{"decision":"ask"}` (the observer opt-in value added by
PR #20 commit 28aa5f4). The v0.2.1 -> v0.3.0 transition flipped
the decision but the README was not updated. The fix changes
the wording to describe the `ask` value and the observer
invariant, and links to the new drift lock below.
2. scripts/smoke.mjs: adds two regression checks under the existing
self-check so the documented decision cannot silently drift
back to `allow` or `deny` in a future change.
- 5b. Reads permission-request.ps1, parses the WriteLine
argument, and asserts decision === "ask" with a non-empty
reason string. Exits 1 on FAIL. Verified locally: a
mutation that flips "ask" -> "allow" produces
`1 fail` with the message
"decision is "allow", expected "ask" (observer opt-in,
per PR #20)".
- 5c. Reads README.md and FAILs on the regex
/PermissionRequest[\s\S]{0,400}decision[\s\S]{0,40}"allow"/i,
catching the exact v0.2.1 wording that was in the
previously-merged docstring.
Smoke is now 42 pass / 7 warn (the same 7 forward events from
PR #20) / 0 fail. The two new checks are PASS by default and
only trip on actual drift.
Out of scope: no change to the Hook scripts themselves, no change
to the portable spec (PR #20), no change to the test event
payload fixtures used by the e2e smoke (which is a separate
PowerShell script in the local dev tree, not the PR).
Refs: MiniMax-Code-Plugins PR #21 review at 2026-08-26T01:14:52Z
"PermissionRequest returns {\"decision\":\"allow\"} ... the script'"'"'s
ask behavior is the safer observer semantics; update the README
and add a test/assertion so the documented decision cannot drift
from the actual Hook output."1 parent 7f15cf1 commit 526f0a2
2 files changed
Lines changed: 61 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
273 | 324 | | |
274 | 325 | | |
275 | 326 | | |
| |||
0 commit comments