fix(solicitation-create): align with current labs reality + document ideal end-state (connect-labs#212)#405
Merged
Conversation
…ideal end-state (connect-labs#212) Surfaced during the malaria-itn-app/20260521-1400 Phase 8 republish (solicitation 3140). Three labs-side gaps required inline workarounds in the skill until jjackson/connect-labs#212 ships: (a) Wire-shape drift. Atom inputSchema declares {data: {...fields...}} but deployed labs server expects fields flat at JSON-RPC params level. Step 6 now documents both paths: try the MCP atom as documented first; if labs returns "unknown fields: ['data']", fallback to direct JSON-RPC POST with flat shape. (b) questions[].framing rejected as unknown key. Adopted the literal 'Why we're asking: <framing>\n\n<text>' inline anchor convention in the text field. Load-bearing for solicitation-review which parses the framing back out on this anchor. (c) evaluation_criteria[].id required by server but undocumented in atom inputSchema. Added id as a required field on the criterion shape with slugify(name) as the derivation fallback. Step 7a verifier rewritten from "curl the public URL" to "get_solicitation round-trip" — the labs public-detail page now 302s to /labs/login/ even when is_public: true (also tracked in #212), so the curl-grep verifier can't run. The round-trip via get_solicitation provides the same structural check at the persistence layer. When all four #212 items ship: drop the inline workarounds, emit framing as a structured key, drop the wire-shape fallback paragraph, restore the curl-the-public-URL verifier as a second post-round-trip check. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 22, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to jjackson/connect-labs#212 (filed). Three labs-side gaps surfaced during the malaria-itn-app/20260521-1400 Phase 8 republish (solicitation 3140) need inline workarounds in this skill until #212 ships.
Cross-ref
Labs issue: jjackson/connect-labs#212 — "solicitation MCP: align proxy inputSchema with deployed validation; add framing + criterion.id as first-class." Four asks: (1) atom inputSchema vs server validation alignment, (2)
questions[].framingas first-class structured field, (3)evaluation_criteria[].iddocumented as required (or auto-derived from name), (4)is_public: truesolicitation detail pages truly unauthenticated.What this PR changes
Step 6 — wire-shape fallback
Atom inputSchema declares
{program_id, data: {...solicitation fields...}}. Deployed labs server expects fields flat at JSON-RPC params level and rejects thedataenvelope withunknown fields: ['data']. Documents both paths:https://labs.connect.dimagi.com/mcp/with flat-fields payload +Authorization: Bearer ${LABS_MCP_TOKEN}. Body shape documented inline.questions[].framing— inline-prefix conventionServer rejects a structured
framingkey. Until #212 lands, framing goes inline intextusing the literal anchorWhy we're asking: <framing>\\n\\n<actual-prompt>. The blank-line gap is load-bearing —solicitation-reviewparses the framing back out on this anchor. Documented in both the payload table (Step 2) and the question shape (Step 4).evaluation_criteria[].id— required fieldServer enforces
ideven though the atom inputSchema doesn't currently declare it. Addedidas REQUIRED in the criterion shape withslugify(name)as the derivation fallback. Documented in the payload table (Step 2) and the criterion shape (Step 3).Step 7a verifier — round-trip instead of curl-the-public-URL
The original Step 7a curl'd the public URL and grep'd for rendered sections. Labs now 302s the public-detail page to
/labs/login/even whenis_public: true, so vanilla curl gets the login page. Rewritten to useget_solicitationround-trip as the structural verifier:mcp__connect-labs__get_solicitation.id+text(withWhy we're asking:anchor) +required+type.id+name+weight+scoring_guide+linked_questions;sum(weights) == 100.Any miss →
[BLOCKER]naming the missing/mutated field + probable cause. Provides the same drift detection at the persistence layer instead of the rendered layer.Removal plan when #212 ships
Change Log entry documents the rollback path: drop the inline workarounds, emit
framingas a structured key, drop the wire-shape fallback paragraph, restore the curl-the-public-URL verifier as a second post-round-trip check (the original Step 7a, surfaced as the structural backstop for the rendered layer rather than just the persistence layer).Test plan
/ace:step solicitation-create malaria-itn-app/20260521-1400against the new SKILL.md; verify the round-trip verifier passes.framingfield round-trips; atom-as-documented call succeeds without flat-shape fallback; curl-the-public-URL verifier runs cleanly.🤖 Generated with Claude Code