fix patch icp,gateway feat/phase-2g-bundle
AI Agent git-import/068377df · 116 days ago · Apr 2, 2026 · Diff

fix(icp,gateway): unescape JSON strings in canister; fix hints body+budget

extractJsonString preserved escape sequences verbatim, so fields stored via JSON POST (suggested_labels_json, assistant_suggested_frontmatter_json) kept literal backslash-quote pairs. The GET handler inlines these as raw JSON values — the preserved escapes made every enriched proposal response unparseable ("not valid JSON (200)").

Fix: unescape standard JSON escapes (\" → ", \\ → \, \n, \r, \t, \/) during extraction so stored text matches the original value.

Also fix the hints job: the canister create response omits `body`, so the PR #84 fast-path always sent an empty body to the LLM. Require a truthy body before skipping the canister GET. Increase the Promise.race budget from 6 s to 18 s (Netlify function limit is 26 s) so the full canister-GET + OpenAI + canister-POST chain has room to complete.

sha256:9f025e941e283f516bb096718ab681fb4f8c0905f59c30059a8229e100a5c597 sha
sha256:2375e3fa239f453fbfe68f192be6d68d5c37bdbd64f3b8ca674187105b91a524 snapshot
← Older Oldest on feat/phase-2g-bundle
All commits
Newer → Latest on feat/phase-2g-bundle

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:9f025e941e283f516bb096718ab681fb4f8c0905f59c30059a8229e100a5c597 --body "your comment"