Repository navigation
feat(scenarios): gallery export owes the template mode — unmanaged install with the sample data copied - #38646
Conversation
…sample data copied; the export owes it and writes the unmanaged install mode Claude-Session: https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE Co-authored-by: Claude <noreply@anthropic.com>
…install mode and the check's new finding Claude-Session: https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE Co-authored-by: Claude <noreply@anthropic.com>
…ate half Claude-Session: https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 6 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 6c5c9ab3d1539524f51e267ae42a54a53a3a4467 && git checkout 6c5c9ab3d1539524f51e267ae42a54a53a3a4467
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ac0f928b1b49a490031767f57ea25b85503b7926 6e32cf71ecd9b33f2617361f639bf7a75ded1242 && git checkout -B drift-repro ac0f928b1b49a490031767f57ea25b85503b7926 && git merge --no-ff 6e32cf71ecd9b33f2617361f639bf7a75ded1242
node scripts/docs-audit/affected-docs.mjs --json ac0f928b1b49a490031767f57ea25b85503b7926
|
|
repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE Final head for L1: Points for the reviewer:
|
|
repo:objectstack#3 · os-steve · session_01ADHkmQm8PTU4AkVU5kdwEv 席位核对ACCEPT @ Read at head:
|
|
repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE Landing · 2026-11-29T20:40Z · head
Checks: newest run of each check green (33 success, 16 expected skip). |
Requested by Steve · project thread
Fixes #35266
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
--template-sample-data(src/runner/orchestrate.ts,cli.ts,app.ts,scorecard.ts): template mode installs the passing scratch build unmanaged with the card's seed rows as the package'sdata[](the samesampleDataOfrows the export writes) and the install door's seed copy on (seedSampleData: true). The fresh copies a Run half moves to install the same way. The Run half then seeds nothing (seedFromCopy). It reads the card's rows back from the copy, and a row the copy does not hold is refused by name, soseedDependenceleaves every turn that reads it not measured. It binds the copied rows to the persona users it creates after the copy:owner_id, a persona record'suserfield and a user-handle field, one data-API update per row, only where they differ. Then it asks over those rows. The record keeps the door's report (seed.copied), the bound fields (seed.bound) andtemplate.seedSampleData. The scorecard's Seed cell readsN/M copied by the install. Without the flag nothing changes, and the flag is refused when--modesleaves template out.src/export/refresh.ts):runnerArgvasks for--modes scratch,template --template-sample-data, and the PR body's Run line says so.src/export/pass.ts): the record owes the template mode run that way. Each of these keeps the card out with a reason of its own, whichrefreshPrBodylists underRefused: no template mode; a template mode without the copy; a skipped template mode; an unmanaged install the door refused (its status, code and message); a template half that did not pass.src/export/trial-package.ts, newsrc/export/stack-config.ts): the config'smanifestliteral gainsinstallModes: ['unmanaged']through an AST splice, every other byte kept, andobjectstack.manifest.jsongainssolutionType: 'template'. The export is refused, each case with its reason, when the manifest cannot be read as written, when it declares install modes withoutunmanaged, or when the build carries codeplugins(defineStackrefuses that install mode beside code). Install modes already declared withunmanagedare kept.src/export/check.ts): new findingapp-install-modes. It fires when themanifest:literal ofsource/objectstack.config.ts, read as written, has noinstallModescontaining'unmanaged'. The TypeScript API loads only when a config is judged, so an empty gallery still loads none.patchchangeset.Tests
The card's four pins, each ablated once and restored. Every mutation landed through
scripts/ablation-replace.mjs, and each restore was proved by blob equal to HEAD and an emptygit diff HEAD:exporter.test.ts,[#35266] the gallery owes the template half…). A 422UNMANAGED_INSTALL_UNCOPYABLEinstall answer gives the door's words as the first reason, followed by the three template halvesnot-run. Nothing is exported, and the refresh PR body lists the card under## Refused (1). A failed template half, a record with no template mode, and a template mode without the copy are each refused too. Ablation:pass.tsinstall-refusal branch replaced withelse if (false), so 1 of 1 failed; restored.orchestrate.test.ts,runCard — --template-sample-data…). Every template-mode app holds exactlysampleDataOf(card).datasetsand made 0 runner seed loads.seed.copiedis{ mode: 'inline', inserted: 8, errors: 0 }, and Sam's accounts are bound to the sdr's user. When the copy does not hold a row, the template half's contact questions are not measured while the scratch half, which uses the runner's own seed, measures them. A copy that did not load refuses all 8 rows with the door's reason. Without the flag the half seeds as before. Ablation:seedCopy ? seedFromCopy(replaced withfalse ? …, so 4 of 5 failed; restored.exporter.test.ts, the trial-package describes). Ablation (a) droppedwithInstallModesfrom the config write: 2 failed. Ablation (b) deletedsolutionType: 3 failed. Both restored.--checkrefuses a manifest withoutunmanaged(check.test.ts,checkGallery — install modes…). The finding fires for noinstallModes, for['managed'], for a non-literal list and for a non-literal manifest.['managed', 'unmanaged']passes clean, and so does the exporter's own output. Ablation: thecheckInstallModescall deleted, so 3 failed; restored. Also smoke-run on the built bin:node bin/objectstack-scenarios.js export-gallery --checkon the exporter's clean tree printedgallery check: clean, exit 0. The same tree with the spliced line removed printed oneapp-install-modesfinding, exit 1.Package suite and typecheck at 6e32cf7
pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios testunder the verify lock:Test Files 45 passed (45),Tests 1424 passed (1424),VERDICT command-exit 0.tsc --noEmit -p packages/qa/scenarios/tsconfig.json: exit 0.Acceptance notes
userfield and the handle fields, the same values its own seed writes, before asking. Without that step every persona-scoped question would read rows nobody owns. No row content comes from the runner.runCard'sverified). The iterate change is then applied to the copy. The exportedsource/is the scratch project after its own iterate, so the unmanaged install of that exact iterated tree is not itself installed by the run. The newpluginsrefusal and the check cover the two keys that decidedefineStack's verdict.data.seededcounts with no per-row list), the copy keeping the card's row ids, and the admin's data-API update ofowner_id. These were read from the install door's source (marketplace-install-local-plugin.ts,loadUnmanagedCopySeeds) and its dogfood (install-local-unmanaged-seed-copy). The card's own verification comment measured the ids kept on a real install. No live AI driver run was made, per the dispatch. The proof is the package's doubles.scorecard.mdshows it, and its Seed cell says the rows were copied.asset_lifecycle) carries anapp-install-modesfinding under the next published check until the next refresh rewrites it. The changeset says so.mainnow declaresdata: [articles](packages/create-objectstack/src/templates/blank/objectstack.config.ts). The exporter's existingwithSampleDatarefuses such a config with "already declaresdata:" (probe on this tree:REFUSED). So once that scaffold reaches a stable release, every card built on it would stay out of the gallery. Not fixed here.Verification
Read first, by risk:
src/runner/orchestrate.ts(seedFromCopyand thewithInstalledBuildhunk that addsdataafter the collections and the baseline are read),src/export/pass.ts(judgeRecord's template reasons),src/export/stack-config.ts.Two minutes:
pnpm --filter @objectstack/scenarios exec vitest run test/runner/orchestrate.test.ts -t template-sample-data. Expect 5 passed, with no--before the filter.Gates (local subset, at 6e32cf7)
node scripts/pm/dispatch-gates.mjs --commandsat6e32cf71e: 70 families. All 70 were run, and 69 exited 0.node scripts/check-plugin-teardown-shape.mjs --self-testfirst exited 3 because this shallow clone could not reach its pinned fixture commit. I fetched that one commit (--depth=1) and reran it: exit 0,48 cases pass.pnpm check:dual-build-cjs-loads: exit 3, NOT MEASURED, reasonPREREQUISITE NOT MET: 63 packages have nodist/, and a full-repo build is CI's job. Its--self-testpassed (94 cases). As a narrower local probe, every built CJS entry of@objectstack/scenariosloads withrequire(bin,cli,export-check,export,index,runner,score-full,score). The CI check-run is the verdict.dispatch-gates --ranwith each exit code recorded:70 derived famil(ies) accounted for — 69 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE