@groundnuty/macf 0.2.22 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "b774087f4dd47bf84d070edd892c93abb85d611b",
3
- "built_at": "2026-05-04T20:16:38.810Z"
2
+ "commit": "a343755bd3acb6f712cb5b124f84635a93568752",
3
+ "built_at": "2026-05-18T13:06:49.351Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundnuty/macf",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Multi-Agent Coordination Framework CLI — coordinate Claude Code agents via GitHub. Installs as `macf` binary; use `macf init` to set up an agent workspace, `macf update` to refresh rules + version pins.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "test:watch": "vitest"
36
36
  },
37
37
  "dependencies": {
38
- "@groundnuty/macf-core": "0.2.22",
38
+ "@groundnuty/macf-core": "0.2.24",
39
39
  "commander": "^14.0.3",
40
40
  "reflect-metadata": "^0.2.2",
41
41
  "zod": "^4.0.0"
@@ -148,14 +148,22 @@ COMMENT_AUTHOR=$(gh issue view N --json comments --jq '.comments[-1].author.logi
148
148
 
149
149
  ### Pattern B — Pre-flight state validation
150
150
 
151
- Before the operation, validate that the precondition for the good path holds:
151
+ Before the operation, validate that the precondition for the good path holds. **Validate the full shape of the state, not just a coarse prefix** — coarse-grained checks admit malformed-but-prefix-conformant values that satisfy the gate but violate the actual contract.
152
152
 
153
153
  ```bash
154
- # Token prefix check before gh ops
154
+ # WRONG: prefix-only check admits values like "ghs_; rm -rf x" through
155
155
  [[ "$GH_TOKEN" == ghs_* ]] || { echo "FATAL: bad token"; exit 1; }
156
156
  gh ...
157
+
158
+ # RIGHT: shape validation — restricts to the actual installation-token alphabet
159
+ [[ "$GH_TOKEN" =~ ^ghs_[A-Za-z0-9_]+$ ]] || { echo "FATAL: bad token shape"; exit 1; }
160
+ gh ...
157
161
  ```
158
162
 
163
+ **Why this matters:** the §4.4 failure-injection sprint (paper-research §27) found that the deployed `check-gh-token.sh` PreToolUse hook used a substring prefix check (`${GH_TOKEN_VALUE:0:4} == ghs_`), which admitted the injection `GH_TOKEN=ghs_; rm -rf <sentinel>` (first-4-char check passes; full shape contains shell metacharacters). End-to-end attribution was still caught at the gh API boundary (HTTP 401 on a malformed token), so production behavior was unaffected — but Pattern B's specific contract (block-at-the-boundary) was bypassed for that injection class. The hardened regex above (or equivalent full-shape validation) restores the contract.
164
+
165
+ **Coverage-gap classification:** defense-pattern coverage gaps inside the deployed boundary are themselves a sub-class of silent-fallback hazard, distinct from the designed-defense gap the pattern targets. The Pattern B example above is the canonical instance; sister observations may surface in other patterns where coarse-grained checks substitute for full-shape validation. Reviewers extending this catalog should test their patterns' deployed implementations against shape-violation injections, not just contract-violation injections.
166
+
159
167
  ### Pattern C — Heartbeat / activity invariant
160
168
 
161
169
  For routing-style operations, check that recipient state advanced post-delivery: