Repository navigation
feat(payments): share adapters and verify School and Calendar checkout - #357
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf784cb892
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a73a3099fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bundle size18 of 195 bundles changed.
Showing the 10 largest changes by absolute gzip bytes.
Measured 22 packed archives separately; full report includes their compressed bytes without installed dependencies. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Orchestrator integration finding from #347 / PR #363: a real external pinned consumer fails to load the new School package with published CMS 1.0 because PR #363 prepares CMS 1.1 and the required School CMS minimum, with a strict external consumer proving the corrected combination. Parent merge coordination will land that correction first, then refresh this candidate from latest main, preserve the CMS floor/Calendar confirmation context, reconcile the unpublished version metadata, and rerun the relevant packed checks plus exact-head CI/review/gate. Keep this PR and its lease available for that refresh; do not merge the current candidate. This is a concrete standalone-install compatibility requirement, and no package publication is authorized here. |
|
Confirmed the dependency-floor finding: School imports recordContentRevision while its current workspace:^ CMS dependency packs against source CMS 1.0. Current head 1c0e20a has all 62 checks green, final-head Codex review clear, and a passing repository gate receipt, but those same-source archives do not prove the published CMS minimum. I have recorded this as an unresolved integration blocker and am holding branch changes while the parent coordinates #363 before this candidate's base/cohort refresh. PR and retained lease remain available; no merge or publication performed. |
|
Read-only refresh preview against #363 cdd9bad found five conflicts: Calendar changelog + operations; School changelog + package + operations. I saved a resolution plan beside the retained checkpoint (issue-343-integration-refresh-plan.md), with no branch/index/source edits. Two details need preserving: Calendar payment delivery serialization plus the new reschedule confirmation context; School's conditional enrollment status guard plus the new {enrollment, completedNow} observer result/callers. Keep School 2.0 for its breaking adapter contract and verify the actual packed CMS ^1.1 minimum. Parent still owns refresh/merge sequencing; worker remains active and held. |
|
Native read-only composition review found another integration requirement for #363→#357: School's paid webhook retries onAfterEnroll whenever payment.status is paid, hookDelivered is false, and row.status is not cancelled (operations.ts around645–692). After a failed enrollment callback, a student can complete the course before the webhook retry. The retry then passes status completed to PR363's Analytics school.onAfterEnroll, which accepts only enrolled (bridges.ts114–120), silently skips course_enrolled, and returns successfully; School marks hookDelivered=true. Please preserve the enrollment event on this valid completed retry (or define an equivalent stable event-snapshot contract), with a composition regression. No source edits made while parent owns sequencing. Latest preview c005af7 also adds a sixth conflict in registry/btst-school.json; regenerate after resolving source. |
|
Executed the composition replay with built School + the upstream packed Analytics archive and a real signed local Stripe-format webhook. Confirmed: callback statuses [enrolled, completed], responses [500,200,200], Analytics attempted only once, emitted=[], final enrollment completed and hookDelivered=true. Repro and JSON receipt are issue-343-enrollment-analytics-retry-repro.mjs/.json beside checkpoints. No source mutation or live provider call. Archive source3569f45 has the same enrolled-only bridge filter reviewed at c005af7; this is defect evidence, not post-refresh validation. |
|
Concrete version-reconciliation detail for the saved refresh plan: incoming #363 packages/cli/src/utils/installation-set.ts still pins Core6.0.0 / School1.1.0 (correct for that standalone candidate). The payment refresh must reconcile those and existing scaffold-plan expectations to the final unpublished Core6.1 / School2 cohort, preserving CMS1.1 and Calendar1.1. Otherwise generated consumers keep selecting the earlier School contract even after source packages are refreshed. No branch/source edits made. |
|
Existing #343 worker is taking the refresh now that #363 merged (172e0bd), using the retained lease11 and branch. I will merge latest main, resolve the six preview conflicts, preserve CMS1.1/Calendar context and School2, reconcile generator pins, fix/test the completed-enrollment retry composition, then rerun packed and exact-head verification. No new Impulse request or helper tab; native reviewers will be reused. Parent retains merge authority. |
|
#363 is now merged at Resolve the six integration conflicts from the preview, preserving the Calendar delivery queue plus reschedule confirmation context, School conditional payment state, both completion-observer callers, School 2.0/Core >=6.1 floor, and actual CMS 1.1 dependency minimum. Reconcile prepared changelog/version notes and regenerate registry from the resolved source. The completed-enrollment retry finding is a required part of this refresh: add a real composed signed paid-webhook → enrollment sink failure → course completion → paid-webhook retry regression. Preserve the enrollment-event meaning and emit one eventual Run targeted post-resolution types/builds/tests and real pinned CMS/School/Core packed proof, then native reviews, push, exact-head Codex review and CI/gate. Reply to the findings with actual correction/verification receipts. Parent still serializes the merge. No new Impulse helpers or package publication. |
|
Refreshed onto merged #363 / main172e0bd in b047301. Preserved School CAS + completion observers and Calendar payment delivery queue + reschedule context; retained School2 and packed CMS^1.1/Core>=6.1 floor, with reconciled CLI cohort pins. Fixed the completed-enrollment Analytics retry; regression failed before and School21 passes after.293focused tests, affected builds/types, clean payment/School/Calendar types, Biome55, docs build, registry, and packed School/Calendar/Ecommerce ESM/CJS/types/browser fixtures pass. Native standards/spec/security reviews clear, including exact outgoing/post-hold security review; no bypass. New-head CI/deployments and separate strict pinned cohort proof are pending; parent retains merge authority. @codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The strict external cohort proof now passes on exact b047301 in both ESM and CommonJS. Eight sealed candidate archives were installed with strict peers; unchanged Media/FormBuilder/Newsletter are actual published1.0.0 (gitHead1e8fe46), not same-source replacements. Packed School requires CMS^1.1.0 and installed CMS is1.1.0; all source owners resolve one candidate Core6.1. Paid School's signed callback fails once before actual Analytics ingestion, real learning completes, then two signed retries yield exactly one eventual course_enrolled plus one course_completed, completed access and durable delivery preserved. Paid Calendar holds capacity and emits one confirmation/one reschedule while legacy notifications run twice. Real ingestion hashes one shared session and strips private data. All3 generated Kysely backends compile in both module-format outputs, along with public hook/payment/client contracts; actual packed CLI Core/School/Ecommerce pins checked. Durable receipt: issue-343-refresh-cohort/status.json and result/runtime/types/seal logs beside parent checkpoints. No browser/live provider/external database in this custom fixture; separate real browser fixtures already passed. CMS floor and composition blockers are resolved locally; only final-head CI/deployments/fresh gate and late sweep remain. No merge/publication performed. |
|
Worker handoff: b047301 is ready for parent merge. All62exact-head checks pass, both deployments pass, final-head Codex review is completed with no findings, and the repository gate passed with matching fresh evidence. Fresh sweep read formal reviews, all inline threads including the outdated finding, and updated PR comments; all findings are addressed/resolved. Current main remains172e0bd and is an ancestor. CMS^1.1 floor, completed enrollment retry, preserved Calendar context/School observers, generator cohort,293focused tests, clean types/builds/registry/docs, three packed browser fixtures and the actual published-minimum pinned cohort proof are verified. Gate receipt: issue-343-gate-b0473010.json; handoff issue-343-status.json; all helper/artifact receipts preserved. Retaining lease11 for parent follow-up. Reporting this #343 worker success through its existing Impulse context; parent still owns the merge. No merge or package publication performed. |
|
Parent merged the verified final candidate |
Summary
Closes #343. School and Calendar create asynchronous checkout through the shared Core payment adapters, and grant access or confirm capacity only after signed payment verification. Ecommerce retains its existing API exports.
Evidence
All screenshots, recording and reproducible browser fixture · Captioned MP4 · WebM
These durable owner-accessible archive links require the owner's website login and LAN/private Tailscale access. They are not public GitHub uploads. The report and all 21 attachments passed archive verification. Every captioned frame and the five mobile screenshots were inspected. UI evidence was captured on
bf784cb8; later refund, checkout-ownership and integration fixes have targeted regression coverage; the refreshed packed browser fixtures pass onb0473010.Merge Danger
Door: one-way while pending payments exist
Migrate persistent databases before upgrading: nullable private
paymenttext columns onschoolEnrollmentandcalendarBooking. Drain or cancel pending enrollments/holds before rolling back to an older runtime. School 2.0 replaces its synchronous payment callback with the shared signed asynchronous contract. The affected plugins require Core >=6.1.0; School requires CMS ^1.1.0. The CLI selects the reconciled Core 6.1 / School 2.0 / Calendar 1.1 / CMS 1.1 / Ecommerce 1.0.1 cohort. Version metadata is prepared; this PR does not publish packages.Hosted Calendar redirects require session storage; when unavailable, the private link is preserved and checkout waits for storage to be enabled. Hosts supply a provider SDK form for client secrets through
renderPayment. Hooks can run again after failure or across processes and must be idempotent by enrollment/booking ID. Abandoned holds still need application-owned cancellation.Blast Radius: payments
Shared provider implementations are moved unchanged, Ecommerce import identity is preserved, and School/Calendar have no dependency on Ecommerce. Existing host-managed Calendar paid holds retain trusted confirmation.