@odla-ai/cli 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/odla-migrate/SKILL.md +5 -2
- package/skills/odla-migrate/references/phase-0-preflight.md +5 -0
- package/skills/odla-migrate/references/phase-2-chapter.md +25 -12
- package/skills/odla-migrate/references/phase-5-cutover.md +8 -3
- package/skills/odla-migrate/references/troubleshooting.md +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/cli",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "Agent-operable CLI for odla provisioning, calendar consent and sync lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://odla.ai/docs/packages/cli",
|
|
@@ -105,8 +105,11 @@ so this is a natural first step.
|
|
|
105
105
|
- `npx @odla-ai/cli smoke --env dev` — live, read-only: public-config, live
|
|
106
106
|
schema diff, a count aggregate. Run after every provision.
|
|
107
107
|
- `wrangler dev` + curl — exercise routes locally before deploying.
|
|
108
|
-
-
|
|
109
|
-
|
|
108
|
+
- Contract probes — compare old and new method/auth/request/response schemas,
|
|
109
|
+
status and relevant headers, not just paths or equal values (Phase 1, again
|
|
110
|
+
from the public domain in Phase 5). Record source commit and immutable
|
|
111
|
+
deployment version separately; an unversioned live response does not prove
|
|
112
|
+
what the current branch implements.
|
|
110
113
|
|
|
111
114
|
## Phase files
|
|
112
115
|
|
|
@@ -16,6 +16,11 @@ Human obligation: none.
|
|
|
16
16
|
`.github/workflows/*` using deploy-pages.
|
|
17
17
|
- Dynamic wishes: forms posting to third parties, `mailto:` contact,
|
|
18
18
|
localStorage used as a database, TODOs mentioning login/db.
|
|
19
|
+
- Every route's method/path, current consumer, owning source file, request and
|
|
20
|
+
response contract, auth/cache behavior, and evidence. Source evidence is a
|
|
21
|
+
path + commit; deployed evidence is an origin + immutable deployment
|
|
22
|
+
version. Never infer current-branch ownership from an unversioned deployed
|
|
23
|
+
response, an old branch, or git history.
|
|
19
24
|
2. Ensure the build outputs to a DEDICATED directory (`dist/`, `_site/`,
|
|
20
25
|
`build/`). If the site is served from the repo root, restructure so a
|
|
21
26
|
build step (even a copy script) produces a clean output dir first.
|
|
@@ -22,12 +22,15 @@ hand-author only the namespaces it does not.
|
|
|
22
22
|
});
|
|
23
23
|
```
|
|
24
24
|
Then diff `chapter.schema` against the site's existing schema **in a test** and
|
|
25
|
-
require equality.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`test/fixtures/legacy-schema.mjs
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
require equality.
|
|
26
|
+
2. **Prove the comparator is independent.** Anchor the reviewed legacy side to
|
|
27
|
+
an exact checked-in source path + commit + digest, or copy it to a literal
|
|
28
|
+
`test/fixtures/legacy-schema.mjs`. It must not import Chapter, the active
|
|
29
|
+
schema/descriptor alias, or another generated candidate, and the migration
|
|
30
|
+
change must not silently update both sides. Deliberately remove or alter one
|
|
31
|
+
known field/rule and prove the test fails before trusting a green result.
|
|
32
|
+
Keep this guard after deletion so an upstream default change fails a test
|
|
33
|
+
instead of a live `provision`.
|
|
31
34
|
3. **Swap provisioning** — `createChapterIntegration(chapter)` in
|
|
32
35
|
`odla.config.mjs` `integrations: [...]`. Inert until the next provision run. It
|
|
33
36
|
supplies schema + rules + seeds, so the `db` block goes away entirely.
|
|
@@ -74,8 +77,16 @@ These bite silently; no smoke test catches them.
|
|
|
74
77
|
`crm_record` mirrors identity, stage, billing, and Clerk linkage. Leader →
|
|
75
78
|
follower delivery intentionally copies allowlisted record fields only, not
|
|
76
79
|
another site's pipeline/account/billing authority.
|
|
77
|
-
- **Route
|
|
78
|
-
|
|
80
|
+
- **Route contracts.** Chapter owns `/api/config` and the group-scoped
|
|
81
|
+
`/api/join-config`, but a matching path or matching monetary values do not
|
|
82
|
+
make it a drop-in replacement. Compare method, auth, request body, response
|
|
83
|
+
status, keys/types/nesting, units, null/omission semantics, and relevant
|
|
84
|
+
headers. Chapter 0.25's join-config returns raw cents, policy copy, and
|
|
85
|
+
readiness; it does not supply a legacy route's prebuilt Stripe line items or
|
|
86
|
+
publishable key. Adopt `JoinIsland` end to end or keep a tested adapter.
|
|
87
|
+
`PaymentStep` gets `clientSecret`, `publishableKey`, and `lineItems` from
|
|
88
|
+
`POST /api/payments/subscription` after the application is submitted and the
|
|
89
|
+
refund policy is acknowledged.
|
|
79
90
|
- **Follower record types.** A follower rejects a pushed business/deal if its own
|
|
80
91
|
CRM does not declare that type and fields. Add the type to the follower config
|
|
81
92
|
and expose it through the standard console before enabling the target in the
|
|
@@ -95,7 +106,9 @@ These bite silently; no smoke test catches them.
|
|
|
95
106
|
## Verify the surface from the types
|
|
96
107
|
|
|
97
108
|
Docs lag at this release cadence. **Read `dist/*.d.ts` and grep the built bundle
|
|
98
|
-
for route strings; treat prose as intent.**
|
|
99
|
-
|
|
100
|
-
of
|
|
101
|
-
|
|
109
|
+
for route strings; treat prose as intent.** A deployed response proves only the
|
|
110
|
+
immutable deployment version you actually probed, not the route owner or
|
|
111
|
+
contract of the branch in front of you. Record source path + commit and deployed
|
|
112
|
+
Worker version separately. When verifying live routes, note that Clerk session
|
|
113
|
+
tokens expire in ~60s — a script that mints a JWT then runs a batch of curls must
|
|
114
|
+
re-mint per batch (`clerk api /sessions`, then `/sessions/<id>/tokens`).
|
|
@@ -41,8 +41,11 @@ instance, never a second Clerk app per env; final go/no-go at each step.
|
|
|
41
41
|
--env prod --plan-digest <digest-from-security-plan>
|
|
42
42
|
--ack-redacted-source`. Never request a PAT; GitHub read approval is not
|
|
43
43
|
snippet-disclosure consent.
|
|
44
|
-
4. `npx wrangler deploy` (first prod deploy).
|
|
45
|
-
`/api/health` and the
|
|
44
|
+
4. `npx wrangler deploy` (first prod deploy). Record the immutable Worker
|
|
45
|
+
version and source commit, then verify `/api/health` and the full
|
|
46
|
+
request/response contracts on the prod workers.dev URL. Equal payload values
|
|
47
|
+
with different keys, nesting, types, units, or omission behavior are not
|
|
48
|
+
parity.
|
|
46
49
|
5. `npx @odla-ai/cli smoke --env prod`.
|
|
47
50
|
6. Human: add the domain to Cloudflare, then attach it to the prod
|
|
48
51
|
worker (Workers & Pages → the worker → Domains & Routes). Supply
|
|
@@ -50,7 +53,9 @@ instance, never a second Clerk app per env; final go/no-go at each step.
|
|
|
50
53
|
7. Cut DNS. GitHub Pages STAYS PUBLISHED — if anything looks wrong,
|
|
51
54
|
the rollback is pointing DNS back at Pages.
|
|
52
55
|
8. Verify from the public domain: parity paths, the gated route (signed
|
|
53
|
-
in and out), `/api/*` routes, the AI route if present.
|
|
56
|
+
in and out), `/api/*` routes, the AI route if present. Use a unique
|
|
57
|
+
non-secret query value and capture cache/version headers so an earlier
|
|
58
|
+
edge-cached response cannot masquerade as the deployed build.
|
|
54
59
|
9. Update MIGRATION.md: cutover timestamp, verification results, and a
|
|
55
60
|
dated reminder ≥ 72 hours out to decommission Pages.
|
|
56
61
|
10. After ≥ 72 hours of clean parallel-run and explicit human
|
|
@@ -100,6 +100,21 @@ Cause: the Clerk session token doesn't include an email claim.
|
|
|
100
100
|
Fix: Clerk dashboard → session token customization → add the email
|
|
101
101
|
claim, then re-test. The worker only forwards what the JWT carries.
|
|
102
102
|
|
|
103
|
+
## A newly deployed route still returns 404
|
|
104
|
+
|
|
105
|
+
Cause: the request may be reaching an older Worker/deployment, or an edge cache
|
|
106
|
+
may still hold a response from before the route, configuration, or credential
|
|
107
|
+
became ready. A deployed URL is also not proof that the checked-out branch owns
|
|
108
|
+
that route.
|
|
109
|
+
|
|
110
|
+
Fix: first identify the checked-in owner from the exact source path and commit.
|
|
111
|
+
Confirm the deployed immutable Worker version matches that commit. Probe both
|
|
112
|
+
the direct workers.dev candidate and the public domain with a unique non-secret
|
|
113
|
+
query value; capture `Age`, `Cache-Control`, `CF-Cache-Status`, `ETag`, and the
|
|
114
|
+
Worker version marker. Re-test after the documented propagation/cache window.
|
|
115
|
+
File a route bug only if the intended version reproduces with fresh evidence.
|
|
116
|
+
Never rotate a key or rewrite the route merely to defeat a cached response.
|
|
117
|
+
|
|
103
118
|
## Re-running provision — is it safe?
|
|
104
119
|
|
|
105
120
|
Yes: plain re-runs are idempotent (existing app registration and configured db
|