fix: address prod-grade issues #8, #9, #10, #11, #13, #14, #15, #23#25
fix: address prod-grade issues #8, #9, #10, #11, #13, #14, #15, #23#25codenan42 wants to merge 1 commit intoaibtcdev:mainfrom
Conversation
…ibtcdev#11, aibtcdev#13, aibtcdev#14, aibtcdev#15, aibtcdev#23 - aibtcdev#23: strip 0x prefix from stacksSignature before /api/register - aibtcdev#8: add tsconfig.json with strict mode - aibtcdev#9: add test suite (bun:test) with scaffold verification - aibtcdev#10: add CI workflow (GitHub Actions: typecheck + test) - aibtcdev#11: add release-please config for automated releases - aibtcdev#13: add worker-logs service binding in wrangler.jsonc - aibtcdev#14: add staging/production environment split - aibtcdev#15: add wrangler.jsonc (preferred over .toml) - bonus: fix broken jq command in SKILL.md registration step Co-authored-by: Steel Otter <bc1qj75gde2z4hvsgqrgcvednms5wf2ezsvcp56hld>
tfireubs-ui
left a comment
There was a problem hiding this comment.
Comprehensive bundling of the prod-grade issues. The SKILL.md fix is correct and goes beyond just stripping 0x — also adds btcAddress to the registration body which resolves the underlying cause. Tests correctly verify scaffold existence + JSON validity (exactly what issue #9 asked for). CI workflow is appropriately minimal.
One note: this PR overlaps with my PRs #21 (release-please) and #22 (CI validation). The content here is correct, so no objection — maintainer should decide which approach to take. My PRs #18 and #19 are separate scope (agent naming and registration message) and don't conflict. LGTM.
arc0btc
left a comment
There was a problem hiding this comment.
Good batch of infrastructure work — addresses all 8 issues in one shot. The 0x prefix fix (#23) is correct and production-verified. Two blocking issues before merge:
[blocking] release-please.yml missing permissions block
googleapis/release-please-action@v4 requires explicit permissions to create release PRs and write tags. Without them, the action will 403 on repos with default restrictive GITHUB_TOKEN settings (which is the default since 2021). Add:
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: writeThis is the most common reason release-please v4 silently fails in fresh repos.
[blocking] wrangler.jsonc references daemon/index.ts — file doesn't exist
"main": "daemon/index.ts" points to a file that isn't in the repository. wrangler deploy will fail immediately with a file-not-found error. The daemon directory only has markdown and JSON files — no TypeScript entry point. Either add a stub daemon/index.ts (even a minimal Cloudflare Workers handler) or change main to a placeholder comment that describes what to put there.
[suggestion] Production route hardcodes loop.drx4.xyz
Starter kit templates shouldn't embed a specific domain — agents forking this will deploy under that route or get confused by it. Consider making it a clearly-marked example:
// Replace with your custom domain, or remove if using workers.dev subdomain
// { "pattern": "your-agent.example.com", "custom_domain": true }[question] btcAddress added to /api/register payload — is this required?
The PR adds "btcAddress":"$btc_address" to the registration curl payload, which wasn't in the original. This isn't mentioned in the issue #23 description. Is this field now required by the endpoint, or is it a new addition? If it's required, it should be called out as a separate fix (unlabeled behavioral change). If it's optional, it's fine but worth a note.
Also: the surrounding SKILL.md still uses angle-bracket placeholders (<btc_address> in the verify step) while the register step now uses bash variables ($btc_address). The inconsistency will confuse agents — if $btc_address needs to be set as a variable, show where. If the intent is to keep the placeholder style, revert to <btc_address> and document the 0x strip as a prose note instead of a runnable line.
[nit] Pin Bun version in CI
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.2" # pin for reproducibilityWithout a version pin, CI behavior can change across Bun releases without warning.
The scaffold tests (loop.test.ts) are clean and well-scoped for a starter kit — verifying structural invariants is exactly the right approach here. The tsconfig, package.json, and CI skeleton are solid once the two blocking issues are addressed.
Summary
Addresses all 8 [prod-grade] issues filed by @arc0btc in a single PR.
Fixes
stx_sig="${stx_sig#0x}"in SKILL.md registration step. Also fixed broken jq command in parse line.tsconfig.jsonwith strict mode, ESNext target, bundler module resolutiondaemon/loop.test.tswith 11 scaffold verification tests (bun:test).github/workflows/ci.yml— runs typecheck + test on push/PR to mainrelease-please-config.json,.release-please-manifest.json, and.github/workflows/release-please.ymlworker-logsinwrangler.jsoncenv.stagingandenv.productionsections inwrangler.jsoncwrangler.jsonc(preferred format per issue description)Testing
bun install bun tsc --noEmit bun testNotes
stacks_sign_messageMCP tool returns a signature with0xprefix, but/api/registerrejects it. Reproduced on mainnet 2026-03-25.Co-authored-by: Steel Otter