Uh oh!
There was an error while loading. Please reload this page.
feat: wire-format cleanup — drop body projectId, lock timestamp format (#17, #20) - #34
Conversation
8 tasks, 44 steps. Drops projectId from WindowSummary body and locks the timestamp wire format to ms+Z via a dedicated isoNow() helper + strict contract-test regex. Bundled single Node PR. Cross-SDK Python mirror and API defensive-validator follow-ups filed during Task 7. Lands on the Wave 1 branch as a docs-only commit since PR #33 is the active vehicle. Wave 2 implementation will start from a fresh worktree off main once #33 merges.
…#20) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ormat (#20) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
URL path is the source of truth for projectId. The cloud API already extracts it from `POST /projects/:id/telemetry` and ignores the body field. Removing it from the wire payload eliminates the silent-mismatch risk if a future API change started trusting the body field. RecostConfig.projectId is unchanged (still required for cloud mode, still drives the URL path via Transport).
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR implements a wire-format cleanup that introduces centralized timestamp generation via ChangesWire-Format Standardization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Summary
projectIdfield from theWindowSummarybody. The URL pathPOST /projects/:id/telemetryremains the source of truth; the API has always ignored the body field.RecostConfig.projectIdis unchanged.Zsuffix (2026-05-14T12:00:00.000Z). Addssrc/core/time.tswith anisoNow()helper documenting the contract; aggregator + interceptor route through it.tests/contract.test.tswith two new regression guards: a strict ms+Z regex on both timestamps, and aJSON.stringifysubstring check that the body never carriesprojectId.Closes#17. Closes#20.
Wave 2 of the issue-waves roadmap (
docs/superpowers/roadmap-2026-05-13-issue-waves.md).Cross-SDK follow-ups
project_idfrom body, normalize timestamps to ms+Z).body.projectIddiffers from the URL param.Breaking changes (TypeScript-level)
WindowSummary.projectIdis removed. TypeScript consumers readingsummary.projectIdwill get a compile error pointing them here. Per WindowSummary body carries redundantprojectId#17, the only known consumer is the ReCost API, which never read the body field.AggregatorConfig.projectIdis removed. TheAggregatorconstructor no longer accepts the option.Test plan
npm run test— 237/237 green (228 baseline + 1 ms+Z regex + 1 no-projectId-substring + 7 dist)npm run lint— cleannpm run build— clean dual ESM + CJS + DTSprojectId; both timestamps match the locked regex^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Summary by CodeRabbit
Documentation
Bug Fixes
projectIdfrom event body; now retained only for internal routing.Refactor
Tests