Repository navigation
feat(scenarios): the gallery export writes each app as a trial package (listing text, facet, sample data); the check refuses an app with no sample data - #35430
Conversation
…e (listing text, facet, sample data) — WIP Claude-Session: https://claude.ai/code/session_01Q4EjjNq58cmHeqckjZkTFE Co-authored-by: Claude <noreply@anthropic.com>
…fusal; README and changeset Claude-Session: https://claude.ai/code/session_01Q4EjjNq58cmHeqckjZkTFE Co-authored-by: Claude <noreply@anthropic.com>
…ixture, declaring no input outside the package Claude-Session: https://claude.ai/code/session_01Q4EjjNq58cmHeqckjZkTFE Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 67ba03d6a0ecaacef80e996cf2a4dbad104809c6 && git checkout 67ba03d6a0ecaacef80e996cf2a4dbad104809c6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6f36818f032edd8d9cff7aaf65f762374b62e070 3a00aa5efa77b1b231fc13c0be18ae9dfd593aed && git checkout -B drift-repro 6f36818f032edd8d9cff7aaf65f762374b62e070 && git merge --no-ff 3a00aa5efa77b1b231fc13c0be18ae9dfd593aed
node scripts/docs-audit/affected-docs.mjs --json 6f36818f032edd8d9cff7aaf65f762374b62e070
|
…iden @objectstack/scenarios/export) Claude-Session: https://claude.ai/code/session_01Q4EjjNq58cmHeqckjZkTFE Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#6 · hotlong · session_01Q4EjjNq58cmHeqckjZkTFE Contract reviewServed-tier: ① Derived judgmentsFace: the ② Semver level
③ Boundary flags
④ Design judgmentThe config edit is an AST splice that leaves every other byte as authored and refuses (located) when the shape is not a Implemented-by: VERDICT: PASS |
|
repo:objectstack#6 · hotlong · session_01Q4EjjNq58cmHeqckjZkTFE 席位核对ACCEPT · head
|
|
repo:objectstack#6 · hotlong · session_01Q4EjjNq58cmHeqckjZkTFE Landing · 2026-11-19T11:43Z · ACCEPT 7004999361 and TIER_DEFAULT PASS 7004989638 (head
State: ready + auto-merge; on MERGED |
Fixes #35132
Clause-②: yes
Metadata-protocol: none
维护者速读
Demoasset,也没有分类。app-sample-data;检查只读不写,不会删除任何应用。packages/qa/scenarios/src/export/trial-package.ts(withSampleData对 AI 写的配置做的 AST 拼接,以及四种拒绝情况)→src/export/check.ts(checkSampleData)→src/export/exporter.ts(trialPackageSource的调用点)。pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/export,预期 4 个文件、132 个测试全部通过。What changes
The gallery exporter (
packages/qa/scenarios/src/export/) now writes each app'ssource/as a package a customer can install and try. It does this after scoring, into the export copy only. The run's own project is never written.objectstack.manifest.json:displayNameanddescriptionare the card's English title andprompt.short. The Chinese pair goes undertranslations.zh.businessFunctionsis the card's own list. The build's other keys are kept.src/sample-data.json: the card's seed rows as stackdata:datasets. There is one dataset per object, nameddemoCODE_object, withexternalId: 'id'and rows as the card states them. Arun.userHandleFieldsfield is left out, and the app README names it.objectstack.config.ts: gets one import line anddata: gallerySampleDataas the first property of the default-exporteddefineStack({ … })literal. The edit is a TypeScript AST splice, and every other byte stays as the AI wrote it. Four cases are refused with a located reason, never guessed: there is no such literal, the literal already declaresdata:or spreads a value, a seeded object is missing from the build, or the build already wrote the file.export-gallery --checkhas a new finding,app-sample-data. It reports a missingsource/src/sample-data.json, a file that is not a non-empty list ofSeedSchema-valid datasets each with a record, or a config that does not import it.typescriptmoves from devDependencies to dependencies. It was already in the install closure through@objectstack/lint. The exporter loads it with a dynamicimport(), soexport-gallery --check(dist/export-check.js) never loads it.installModes,solutionType: 'template', and the check's installModes refusal. These moved to Gallery export requires the runner's template mode (unmanaged install + iterate) to pass, with the sample data in the template run (split from #35132) #35266, which is blocked by Unmanaged install: an AI-built app cannot be a template — itscapabilityitems are runtime-uncreatable and the scaffold's default connectorpluginsare code, soinstallModes: ['unmanaged']is refused #35157. WithinstallModes: ['unmanaged'],defineStackrefuses an app carryingpluginsorcapabilityitems (packages/spec/src/stack.zod.ts:2843).Tests
All at head
30a918ccf0.test/export/exporter.test.tshas a new top-level describe, "the trial package". It pins the manifest's four keys with the build's keys kept. It pins the sample data: namespaced, keyed onid, crm'saccount.ownerleft out. It pins the config edit: one import,datafirst, and the rest byte-identical to the authored file. It checks that the run's project is untouched and that the README line is present. It also covers a scaffold-shaped config, a config with no import line, six refused config shapes, three refused sources, one refusal throughexportGallery(no app directory written), andsampleDataOfover every card in the library.test/export/check.test.ts: the exporter's own output is still clean. There are fourapp-sample-datacases, and the code roster is updated.Readings: package suite, typecheck, ablations
os-verify-lock … vitest run --maxWorkers=2(whole@objectstack/scenariossuite):Test Files 40 passed (40),Tests 1199 passed (1199),VERDICT command-exit 0.pnpm --filter @objectstack/scenarios typecheck: exit 0.ablation-replace.mjsdeleted thecheckSampleData(dir, app, add);call (anchor 1 → 0, blob 0d9fd6d4 → 0c9d9b17). Result:Tests 4 failed | 37 passed (41), which is exactly the four sample-data cases. Restored blob 0d9fd6d4 equals the HEAD blob, andgit diff HEADis empty.trialPackageSourcecall was replaced with the authored files as they are (blob 7b14425e → 16986a84). Result:Tests 32 failed | 67 passed (99)across exporter and check suites. Among them are the layout test, the trial-package export test and thedata:refusal export test; the check's clean tree goes red, as do the other cases that copy it. Restored blob 7b14425e equals HEAD.Acceptance notes
objectstack validatewith the new keys, on a managed stack. A probe project used the blank scaffold'sobjectstack.config.tsverbatim (connector plugins included), the recordedtravel_expensebuild's 7 objects, andtrialPackageSourceoutput with 757 rows.os validateprinted✓ Validation passed, exit 0. The control project without the trial edits also exited 0. A negative leg, with one dataset renamed todemotravel_nope, exited 1 withSeed data references object 'demotravel_nope' which is not defined in objects., so the validator reads the imported JSON. The probe dropped the threestate_machinevalidations from the probe objects in both projects. Without that, both projects failed identically onstate-machine-no-initial-states, an author-time rule unrelated todata:. The probe projects were deleted.expect.objects, and the recordedtravel_expensebuild declares all 7 seeded objects. That build artifact carries nodata, and the probe's scaffold config shape takes the edit. Forasset_lifecycle, 6973237961 addeddata:to the gallery source by hand, and 559 rows (the card's full count) inserted with 0 errors, so the source had nodata:of its own. The gallery repository itself is not readable from this session, so its other listed apps were not checked directly. A tree written by the earlier exporter has no sample-data file, so the check reports each of its apps until the next refresh re-exports it. The check writes nothing.order_to_cash's English title is 131 characters.PackageSchema.displayNameallows at most 128, and itsobjectstack.manifest.jsonfailsTemplateManifestSchema(measured). The exporter writes it anyway rather than refuse the app (a refusal would delete a listed app). This is reported to the seat as a decision; see the report.objectstack.manifest.jsonkeepsreadmePath: 'README.md', but the exporter never copies the scaffold README intosource/.os package publishreadsreadmePathand exits 1 when the file is missing (publish.ts:883, read, not run). carrier: gallery-publish: publish each merged gallery app to the marketplace as an unmanaged template version (os package publish --submit), so customers can install it to try #35134.manifest.namein the config (the in-app package name, e.g.Demoasset) is unchanged: the listing name isobjectstack.manifest.jsondisplayName. carrier: gallery-publish: publish each merged gallery app to the marketplace as an unmanaged template version (os package publish --submit), so customers can install it to try #35134.asOf), not the run date's rebase.@objectstack/scenarios/export: new exportssampleDataOf,listingManifest,withSampleData,trialPackageSource,TrialPackageRefusal,SAMPLE_DATA_FILE,SAMPLE_DATA_SPECIFIER,SAMPLE_DATA_BINDINGand the typeSampleDataset.FINDING_CODESgainsapp-sample-data, so the check accepts less. There is one new runtime dependency,typescript.Verification
Gates (local subset, head 30a918c)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 75 families. All 75 ran:✓ dispatch-gates --ran: 75 derived famil(ies) accounted for — 75 run, 0 NOT-MEASURED (a DERIVED zero …).pnpm check:cross-package-test-inputswas red on a first draft, which read the blank scaffold config fromcreate-objectstack. The pin now uses an inline scaffold-shaped fixture, and the gate exits 0 (OK: 32 package(s) read outside themselves, all declared …).pnpm check:dts-closureandpnpm check:dual-build-cjs-loadsboth exited 1 once in the sweep, naming only@objectstack/organizations'sdist/index.d.ts(a package this diff does not touch) while itsdist/was being rewritten. On re-run both exited 0:260/260 declared declaration file(s) present, and124 published require entry point(s) … load.node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0, 0 anchored files.node scripts/pm/overlap-check.mjs:VERDICT clean exit 0(origin/main, chore: version packages #35129 and fix(settings)!: offer the knowledge settings only where the knowledge service is mounted #34223 merge cleanly).Generated by Claude Code