Skip to content

Fix issue #8 guard guidance, note projection, and IPC waiting - #9

Merged
zhoupengjie merged 3 commits into
mainfrom
fix/issue-8-guard-docs-and-nested-projection
Aug 11, 2026
Merged

zhoupengjie merged 3 commits into
mainfrom
fix/issue-8-guard-docs-and-nested-projection

Conversation

@zhoupengjie

Copy link
Copy Markdown
Collaborator

Summary

Fixes all eight documentation, projection, timeout, batching, and IPC-lock issues reported in #8 while preserving IPC protocol v3 and the six-tool public MCP surface.

What changed

  • documents Context-filled guards and makes guard fields optional in the Agent-facing schemas while retaining fail-closed TypeScript and Lua validation
  • warns when sv_query.fields misses every result-root key
  • documents sv_describe.action
  • compacts and densifies nested get_track_notes groups[].notes
  • raises the cold-start timeout/stale thresholds to 30 s / 60 s
  • documents safe batches and reuse of one writeIntent Context across disjoint batches
  • adds bounded waiting for the cross-process single-writer IPC lock
  • corrects the final action-schema wording so it does not require an unnecessary Context refresh between disjoint batches

Root cause

The v3 façade and internal action schemas exposed inconsistent guidance, nested note projection only handled root-level notes, and lock acquisition failed immediately for a second process. This caused unnecessary round trips, silent empty projections, oversized note responses, and avoidable BRIDGE_BUSY failures.

Validation

  • npm run check: 246/247 locally; the only failure is the known Doctor host-profile check caused by deliberately emptied local .mcp.json and .codex/config.toml. These files are not part of this PR.
  • Node script syntax checks: passed
  • Lua 5.4 syntax checks with luac and luac54: passed
  • v3 tool catalog: 4,552 / 6,000 characters
  • Synthesizer V Studio 2 Pro 2.2.1 real-host verification on Windows 11:
    • cold restart: sv_status 5 ms; first list_tracks 33 ms
    • 30-note write: one Undo record, verified
    • compact nested response: 6,313 chars; dense:"never": 12,217 chars
    • Context guard fill, missing-guard rejection, explicit conflict, disjoint batch reuse, stale-note rejection, and index-shift rejection: passed
    • two-process lock: 20/20 requests succeeded with the default 1 s wait; a 1 ms wait reproduced one BRIDGE_BUSY per pair across 20 rounds

Closes #8

zhoupengjie and others added 3 commits August 11, 2026 23:53
Fixed:
- Document fingerprint guards as Context-filled rather than hand-copied, and
  mark the guard fields optional so sv_describe stops listing them as required.
  A write without both a contextId and an explicit guard now fails in
  TypeScript instead of reaching the SynthV host.
- sv_query.fields documents that it filters only top-level keys of the result
  root, and a projection matching no root key returns projectionWarning with
  the available keys instead of a silent empty object.
- Describe the sv_describe.action parameter on the public facade schema.

Changed:
- get_track_notes compacts and densifies its nested groups[].notes on the
  sv_query projection path. Measured against a live SynthV 2.2.1 host, the
  same 29-note page drops from 15932 to 5966 characters.
- Raise the default response timeout to 30 s and the stale-recovery age to
  60 s so a cold host can answer its first request.
- Wait up to SYNTHV_AGENT_BRIDGE_LOCK_WAIT_MS (1 s by default, clamped to the
  response timeout) for the single-writer IPC lock before reporting
  BRIDGE_BUSY. Two concurrent clients now both complete.
- Document the batch write path measured on the host: at most about 60 note
  edits per call, one writeIntent contextId reused across disjoint batches,
  and a fresh read only after a note changes or an add/delete shifts indices.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Record what issue #8 reported, what changed and why, and the executable
re-verification cases with the values measured against a live SynthV 2.2.1
host, so another agent can reproduce the run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zhoupengjie
zhoupengjie marked this pull request as ready for review August 11, 2026 22:27
@zhoupengjie
zhoupengjie merged commit fe743bc into main Aug 11, 2026
3 checks passed
@zhoupengjie zhoupengjie mentioned this pull request Aug 11, 2026
@zhoupengjie
zhoupengjie deleted the fix/issue-8-guard-docs-and-nested-projection branch August 12, 2026 06:46
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.

[docs/ux] v0.3.0: misleading fingerprint docs, silent fields no-op, oversized get_track_notes (8 items with line refs + session evidence)

1 participant