feat(surface): typed helper-namespace codegen (partial #324) - #332
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 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 |
maintainability lens — FAILMaintainability review — PR #332Blockers
Concerns
Notes
REVIEW_FAILED |
history lens — PASSBlockers: none. PR #332 passes the three HISTORY criteria.
Concern: The PR body’s opening paragraph still says the generator reads manifests and ships “slack + github types.” That contradicts Notes: The remaining providers and mapping/discovery generation are explicitly deferred in REVIEW_PASSED |
structure lens — MISSING |
|
🎯 review-swarm: FAILED (M:fail H:pass S:missing) Lens transcripts posted as sibling comments above. |
Session-Id: 01a0903c-1799-79a2-819f-b0361111a825 Session-Id: efeda5df-9b7c-48d4-b2ce-957f5bef0a82
ddefa17 to
62b099c
Compare
Closes #324 (partial). Minimal slice.
New
scripts/generate-helpers.mjsreads relayfile-adapter manifests and emits typed helper wrappers underpackages/surface/src/helpers/. Ships slack + github types to prove the pattern; remaining ~49 providers land incrementally as follow-ups.Written by codex agent
spec-N-v2on finn-mini; head at ddefa17.🤖 Generated with Claude Code
Note
Low Risk
Authoring-time TypeScript and generated files only; runtime Slack dispatch is unchanged. Main risk is type/API drift if generated helpers diverge from adapters without running
gen.Overview
Introduces codegen for typed surface helper namespaces, starting with Slack’s four journal-backed methods (
post,dm,reply,react). A newscripts/generate-helpers.mjsreads the pinned@relayfile/relay-helpersSlackClientdeclaration and emitspackages/surface/src/helpers/*; argument shapes come from the adapter, return types stay tied to the existing runtimeSlackHelperviaReturnType.Ctxnow extends the generatedHelpersmap instead of declaringslackinline, andHelpersis exported from the package. Regression coverage addsnpm run gen, byte-for-byte drift checks (check-generated-helpers.mjs), snapshot and@ts-expect-errortype tests, plus docs (SURFACE.md,spec-N-minimal-validation.md). Other providers and mapping/discovery generation are explicitly deferred.Reviewed by Cursor Bugbot for commit 62b099c. Bugbot is set up for automated code reviews on this repo. Configure here.