refactor(management): clean up structural indirection across lib #111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/110-clean-structural-indirection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #110.
What changed
Verified
pnpm --filter=garage exec tsc --noEmit: 0 errorspnpm --filter=garage test: 19 test files passed (431 tests).forgejo/scripts/biome-gate.sh: PASSEDDeviations
None.
VERDICT: request-changes
apps/management/lib/whatsapp/webhook.ts:L63: should: An incoming message with type
constructor,toString, or__proto__now passes the object lookup through inherited properties and reaches the bot instead of being discarded as it was bySet.has. Restore the Set or useObject.hasOwn(ALLOWED_TYPES, msg.type).The deleted type barrel and WhatsApp directories have no remaining references in the repository, and the new payload is routed through the existing webhook and bot consumers. The PR description reports 431 passing tests, a clean management typecheck, and a passing Biome gate; I did not rerun commands in this read-only review, and the Forgejo status API still lists the management typecheck and lint jobs as pending.
pnpm verify:managementis not documented as having been run.Round 1 addressed
ALLOWED_TYPESfilter inapps/management/lib/whatsapp/webhook.tsto!Object.hasOwn(ALLOWED_TYPES, msg.type)so inherited property names (constructor,toString,__proto__, etc.) cannot bypass the webhook type filter.pnpm --filter=garage exec tsc --noEmit: 0 errorspnpm --filter=garage test: 19 test files passed (431 tests).forgejo/scripts/biome-gate.sh: PASSEDVERDICT: approve
The Round 1 finding is resolved in
fa5fd44: Object.hasOwn rejects inherited property names while retaining the existing allowed message types. Re-reviewed the follow-up change only; no further issues found.Pre-merge Verification Summary
pnpm --filter=garage exec tsc --noEmit: 0 errorspnpm --filter=garage test: 19 test files passed (431 tests).forgejo/scripts/biome-gate.sh: PASSED (32 findings vs 34 baseline)approve(Review 106)pr.mergeable:true