|
105 | 105 | * ships to consumers no repo sweep can see; the changeset carries their |
106 | 106 | * migration. This census bounds the first-party population only. |
107 | 107 | * - **`objectui` is a RECORDED constant, not a live scan.** A test in this |
108 | | - * repo cannot read that checkout. `OBJECTUI_CENSUS` carries the revision it |
109 | | - * was measured at and the command that reproduces it. |
| 108 | + * repo could not read that checkout. Since objectui was imported under `ui/` |
| 109 | + * (objectstack#25803) it can, but the walk still skips the top-level `ui/`: |
| 110 | + * reading it would make `ui/**` an input of `@objectstack/client#test`, |
| 111 | + * and ci.yml's `crosspkg` filter does not cover that path yet |
| 112 | + * (`check-ci-filter-parity`). `OBJECTUI_CENSUS` is re-recorded at the |
| 113 | + * imported revision, and the live scan returns with the card that adds the |
| 114 | + * path to that filter. |
110 | 115 | * - **The ratchet in section 3 is only as live as turbo's cache — for the |
111 | 116 | * trees still undeclared.** This suite walks the whole workspace, while |
112 | 117 | * `@objectstack/client#test` declares as inputs its own package plus the |
@@ -199,9 +204,18 @@ interface Site { |
199 | 204 | index: number; |
200 | 205 | } |
201 | 206 |
|
| 207 | +/** |
| 208 | + * [#25803] Top-level directories of THIS repository the walk does not enter: |
| 209 | + * the imported objectui tree, recorded as `OBJECTUI_CENSUS` instead (see the |
| 210 | + * header). Matched at the repository root only, never as a name at any depth |
| 211 | + * the way `SKIP_DIRS` is: `packages/spec/src/ui` is this census's own ground. |
| 212 | + */ |
| 213 | +const SKIP_TOP_LEVEL = new Set(['ui']); |
| 214 | + |
202 | 215 | function walk(dir: string, acc: string[] = []): string[] { |
203 | 216 | for (const entry of readdirSync(dir)) { |
204 | 217 | if (SKIP_DIRS.has(entry)) continue; |
| 218 | + if (dir === REPO_ROOT && SKIP_TOP_LEVEL.has(entry)) continue; |
205 | 219 | const p = join(dir, entry); |
206 | 220 | let st; |
207 | 221 | try { st = statSync(p); } catch { continue; } |
@@ -566,41 +580,31 @@ const LEDGER: readonly LedgerRow[] = [ |
566 | 580 | ]; |
567 | 581 |
|
568 | 582 | /** |
569 | | - * `objectui` @ b84dc1854922c266850d6e573daf3ad59cbd0623 (origin/main, |
570 | | - * 2026-08-31). Recorded, not live-scanned — a test here cannot read that |
571 | | - * checkout. Reproduce with `OBJECTUI_CENSUS_COMMAND`. |
572 | | - * |
573 | | - * ⭐ The single production call site in either reachable repo, and it SURVIVES |
574 | | - * the convergence untouched. `aggregate()` feeds the resolved value through a |
575 | | - * tolerant chain that accepts both spellings: |
576 | | - * |
577 | | - * const rawRows = Array.isArray(data) ? data |
578 | | - * : data?.rows && Array.isArray(data.rows) ? data.rows // post-#13079: this branch |
579 | | - * : data?.data && Array.isArray(data.data) ? data.data |
580 | | - * : data?.data?.rows && Array.isArray(data.data.rows) ? data.data.rows // pre-#13079: this branch |
581 | | - * : data?.results && Array.isArray(data.results) ? data.results |
582 | | - * : []; |
| 583 | + * `objectui` @ 9e1fe032866965c7cb0460cff2b6af09350236b7, the revision imported |
| 584 | + * under `ui/` (objectstack#25803; first recorded at b84dc18549, 2026-08-31). |
| 585 | + * Recorded, not live-scanned: the walk skips `ui/` (see the header). Reproduce |
| 586 | + * with `OBJECTUI_CENSUS_COMMAND`; the file count is the walk's own rule applied |
| 587 | + * to the tracked `ui/` tree. |
583 | 588 | * |
584 | | - * Before #13079 branch 4 matched; after it branch 2 matches. ⚠️ It survives |
585 | | - * by DEFENSIVE CODING, not by a designed migration path — the adapter was |
586 | | - * written tolerant because the producer was ambiguous, which is the shape a |
587 | | - * contract-first fix removes rather than relies on. Ruling item 3: objectui#7028 |
588 | | - * tightens the chain to the single post-unwrap spelling, time-gated behind |
589 | | - * this convergence landing and objectui taking the SDK version — the chain is |
590 | | - * load-bearing until then, so it is deliberately NOT part of this change. |
| 589 | + * ⭐ The single production call site in either tree. `aggregate()` used to feed |
| 590 | + * the resolved value through a tolerant chain that accepted both the |
| 591 | + * pre-#13079 envelope and the post-unwrap `AnalyticsResult`. objectui#7028, the |
| 592 | + * tightening this record named as owed, has landed: the adapter reads `rows` |
| 593 | + * off the post-unwrap result and throws `AnalyticsResultShapeError` on any |
| 594 | + * other shape, so it is payload-dependent and reads no envelope. |
591 | 595 | */ |
592 | 596 | const OBJECTUI_CENSUS = { |
593 | | - revision: 'b84dc1854922c266850d6e573daf3ad59cbd0623', |
594 | | - filesScanned: 4024, |
| 597 | + revision: '9e1fe032866965c7cb0460cff2b6af09350236b7', |
| 598 | + filesScanned: 7954, |
595 | 599 | sdkCallSites: 1, |
596 | 600 | productionCallSites: 1, |
597 | 601 | wouldBreak: 0, |
598 | | - site: 'packages/data-objectstack/src/index.ts:4846 (analytics.query, via this.client)', |
| 602 | + site: 'ui/packages/data-objectstack/src/index.ts:6625 (analytics.query, via this.client)', |
599 | 603 | tighteningOwner: 'objectui#7028', |
600 | 604 | } as const; |
601 | 605 |
|
602 | 606 | const OBJECTUI_CENSUS_COMMAND = |
603 | | - "git -C <objectui> grep -nE 'analytics\\s*\\.\\s*(query|meta|explain)\\s*\\(|automation\\s*\\.\\s*trigger\\s*\\(' origin/main -- '*.ts' '*.tsx' '*.js'"; |
| 607 | + "git grep -nE 'analytics\\s*\\.\\s*(query|meta|explain)\\s*\\(|automation\\s*\\.\\s*trigger\\s*\\(' HEAD -- 'ui/*.ts' 'ui/*.tsx' 'ui/*.js'"; |
604 | 608 |
|
605 | 609 | /** |
606 | 610 | * ⛔ `objectstack-ai/cloud` is NOT MEASURED — see the header. Post-#13079 |
@@ -819,6 +823,9 @@ describe('#13079 §3 — every call site is classified', () => { |
819 | 823 | // The three above are LEDGER sums and cannot move on a census reading; |
820 | 824 | // this one is census-derived, so it carries the note. [#13874] |
821 | 825 | expect(sdkSites.length, literalNote()).toBe(28); |
| 826 | + // [#25803] 28 -> 29 first-party SDK sites since the objectui import: the |
| 827 | + // walk's 28 plus the recorded objectui one, which it does not enter. |
| 828 | + expect(sdkSites.length + OBJECTUI_CENSUS.sdkCallSites, literalNote()).toBe(29); |
822 | 829 | }); |
823 | 830 | }); |
824 | 831 |
|
@@ -859,7 +866,11 @@ describe('#13079 §5 — what was NOT measured', () => { |
859 | 866 | expect(OBJECTUI_CENSUS.wouldBreak).toBe(0); |
860 | 867 | expect(OBJECTUI_CENSUS.revision).toMatch(/^[0-9a-f]{40}$/); |
861 | 868 | expect(OBJECTUI_CENSUS.tighteningOwner).toBe('objectui#7028'); |
862 | | - expect(OBJECTUI_CENSUS_COMMAND).toContain('origin/main'); |
| 869 | + expect(OBJECTUI_CENSUS.site.startsWith('ui/')).toBe(true); |
| 870 | + expect(OBJECTUI_CENSUS_COMMAND).toContain("'ui/*.ts'"); |
| 871 | + // [#25803] And the walk really does not enter it, so the record is the |
| 872 | + // only reading of that tree here. |
| 873 | + expect(CENSUS.sites.some((s) => s.file.startsWith('ui/'))).toBe(false); |
863 | 874 | }); |
864 | 875 |
|
865 | 876 | it('⛔ cloud is NOT MEASURED, ruled so, and must not be read as clean', () => { |
|
0 commit comments