Skip to content

fix: nova workaround removal + CCZ truncation + update_yaml shallow-merge + nova_scopes probe + docs (0.13.116)#173

Open
jjackson wants to merge 2 commits into
mainfrom
emdash/e2e-turmeric-or9lf
Open

fix: nova workaround removal + CCZ truncation + update_yaml shallow-merge + nova_scopes probe + docs (0.13.116)#173
jjackson wants to merge 2 commits into
mainfrom
emdash/e2e-turmeric-or9lf

Conversation

@jjackson
Copy link
Copy Markdown
Owner

@jjackson jjackson commented May 9, 2026

Combined PR: drops the obsolete Nova MCP user-scope override workaround and lands five durable fixes that surfaced during turmeric/20260508-1951.

Nova workaround removal (waiting on upstream)

Drop ACE's bin/ace-setup user-scope MCP override now that the Nova plugin exposes server-side PAT via ${NOVA_API_KEY} in .mcp.json headers (voidcraft-labs/nova-plugin#11). Don't merge until that upstream issue lands. See § 0.13.111 in CHANGELOG.

Durable fixes from today's run

What Why it matters
CCZ disk-write commcare_download_ccz now writes to ${CLAUDE_PLUGIN_DATA}/ccz-cache/ and returns ccz_path. Drops ccz_base64. MCP transport silently truncated a 29 KB CCZ payload by ~2.5 KB (default MAX_MCP_OUTPUT_TOKENS ~10K, base64 is ~20K). unzip rejected the corrupted ZIP. Worked around mid-run by calling backend directly.
update_yaml_file deep-merge New mergeMode: 'shallow' | 'deep' parameter. Default stays shallow for backward-compat. Shallow merge wiped phases.design-review when patching phases.commcare-setup.steps.X mid-run. State required manual restoration.
nova_scopes doctor probe (closes #174) New JSON-RPC tools/call get_hq_connection probe; branches on scope_missing/configured:false/domain.name. A scope-missing PAT passed nova_auth and only failed mid-Phase-2.
assessment-removal patch class clarified SKILL.md now reflects that the class strips any commcareconnect-namespaced wrapper (12 forms patched today, not the 6 the docs implied). Operator confusion.
mobile_resolve_selectors clarification SKILL.md explicit that it's a static lookup; no AVD/APK required. Burned a tool call today checking AVD state because of this.
Orphan-app recovery procedure agents/commcare-setup.md Step 0 has a new subsection for the architect-vs-PAT identity split (voidcraft-labs/nova-plugin#13). Saves the next operator from deriving the recovery from scratch.

Test plan

  • npm test: 733 passing, 35 skipped (no new failures)
  • npx tsc --noEmit: clean
  • After merge: /ace:doctor shows nova_scopes: HQ Read scope granted; bound to <domain>
  • After merge: /ace:doctor on a key without HQ Read scope fails loud at nova_scopes (doesn't reach Phase 2)
  • After merge: invoke commcare_download_ccz from a session, verify ccz_path exists on disk and matches ccz_sha256
  • After merge: update_yaml_file with mergeMode:'deep' round-trips a nested patch without wiping siblings (covered by new vitest)

🤖 Generated with Claude Code

jjackson and others added 2 commits May 8, 2026 22:59
…111)

Drop ACE's user-scope MCP override workaround now that the Nova plugin
exposes the server-side PAT via `${NOVA_API_KEY}` in its `.mcp.json`
headers (voidcraft-labs/nova-plugin#11).

The override was fragile — silently fell off across CLI updates with no
doctor signal until a Phase 2 upload halted on a missing
`upload_app_to_hq` tool (turmeric/20260508-1951; immediate trigger).

- bin/ace-setup: deleted ~40-line override block; replaced with one-time
  idempotent `claude mcp remove nova --scope user` for cleanup
- bin/ace-doctor: updated nova_env / nova_auth probe comments + remediation
- agents/commcare-setup.md § Subagent inheritance: explain via plugin-side
  ${NOVA_API_KEY} expansion
- playbook/integrations/nova-integration.md: full rewrite — native PAT path,
  shell-export step (Claude Code reads the var from its process env, not
  from \$CLAUDE_PLUGIN_DATA/.env), nova-plugin#11 added to Resolved Blockers

Operator action on update: export NOVA_API_KEY in shell rc, restart Claude
Code. See playbook/integrations/nova-integration.md § Install + auth step 5.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… doc clarifications (0.13.116)

Five durable fixes surfaced during turmeric/20260508-1951.

**`commcare_download_ccz`** silently returned a truncated base64 payload
(~2.5 KB short on a 29 KB CCZ) — the JSON-RPC transport's default token
cap is ~10K tokens, and ~40 KB of base64 is ~20K. Switch to write-to-disk:
return `ccz_path` to a file in `${CLAUDE_PLUGIN_DATA}/ccz-cache/`, drop
inline `ccz_base64`. **Breaking** for any caller that reads the field;
patched the two consumers in `scripts/`.

**`update_yaml_file`** does top-level shallow-merge — patching
`phases.commcare-setup.steps.X` wiped `phases.design-review` and other
siblings under `phases`. Hit on this run; required manual restoration.
Add `mergeMode: 'shallow' | 'deep'` (default shallow, backward-compat);
deep mode recursively merges plain objects (arrays/primitives replace).

**`bin/ace-doctor`** `nova_auth` only validates the bearer is accepted at
the MCP transport, not that the PAT has per-tool scopes. A scope-missing
key passed `nova_auth` and only failed mid-Phase-2 today (issue #174).
Add `nova_scopes` probe — JSON-RPC `tools/call get_hq_connection`,
branches on `scope_missing` / `configured:false` / `domain.name` /
unexpected. Closes #174.

**Doc updates:**
- `skills/commcare-form-patch/SKILL.md` — `assessment-removal` actually
  strips any `commcareconnect`-namespaced wrapper (12 forms patched on
  this run, not the 6 the docs implied).
- `skills/app-test-cases/SKILL.md` — `mobile_resolve_selectors` is a
  static lookup (reads `connect-<apk>.yaml`); no AVD required.
- `agents/commcare-setup.md` — orphan-app recovery procedure for the
  architect-vs-PAT identity split (voidcraft-labs/nova-plugin#13).

Tests: 733 passing, 35 skipped (no new failures). New suites:
- `test/mcp/gdrive/update-yaml-file.test.ts` — 4 new tests covering
  shallow-wipes-siblings (the bug), deep-preserves-siblings,
  arrays-still-replace, object-vs-non-object mismatch.
- `test/mcp/connect/unit/commcare-download-ccz.test.ts` — disk-write
  contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@jjackson jjackson force-pushed the emdash/e2e-turmeric-or9lf branch from 6b29f26 to fd6f3d2 Compare May 9, 2026 05:11
@jjackson jjackson changed the title nova: drop user-scope override; use plugin's native PAT path (0.13.111) fix: nova workaround removal + CCZ truncation + update_yaml shallow-merge + nova_scopes probe + docs (0.13.116) May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ace-doctor: probe Nova API key scopes (HQ Read/Write), not just bearer-accepted

1 participant