Public dry run dryrun-20b59dc46b72
Source commit: 20b59dc46b72103c2f8a516c692b5cc3d54fab19 Public tree identity: sha256:aaa5ac7b58b2a0d23c6b11e5f76324bf3839ca1f62653a83deb736932adcfbd9
This commit is contained in:
commit
2bef715211
221 changed files with 79792 additions and 0 deletions
105
scripts/website-inventory-contract-smoke.js
Normal file
105
scripts/website-inventory-contract-smoke.js
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const repo = path.resolve(__dirname, "..");
|
||||
const inventoryPath = path.join(repo, "website_mvp_inventory.md");
|
||||
if (!fs.existsSync(inventoryPath)) {
|
||||
if (fs.existsSync(path.join(repo, "DISASMER_PUBLIC_TREE.json"))) {
|
||||
console.log(
|
||||
"Website inventory contract smoke skipped: website_mvp_inventory.md is filtered from this public tree"
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
throw new Error("website_mvp_inventory.md is missing");
|
||||
}
|
||||
const source = fs.readFileSync(inventoryPath, "utf8");
|
||||
|
||||
function expect(name, pattern) {
|
||||
assert.match(source, pattern, `missing website inventory evidence: ${name}`);
|
||||
}
|
||||
|
||||
function criterionLines() {
|
||||
return source
|
||||
.split(/\r?\n/)
|
||||
.filter((line) => /^- \[[ x]\] \*\*/.test(line));
|
||||
}
|
||||
|
||||
expect("header", /^# Disasmer MVP Website Acceptance Criteria/m);
|
||||
expect(
|
||||
"acceptance-style status",
|
||||
/\*\*Status:\*\* (?:private )?hosted website addendum to `acceptance_criteria\.md`, `acceptance_criteria_phase2\.md`, and `cli_acceptance_criteria\.md`/
|
||||
);
|
||||
expect(
|
||||
"hosted signup exception",
|
||||
/except hosted Authentik account creation/
|
||||
);
|
||||
expect(
|
||||
"no duplicate work note",
|
||||
/does not automatically mean new product code, a new feature, or even actual implementation work is required/
|
||||
);
|
||||
expect(
|
||||
"prove existing behavior before implementation",
|
||||
/prefer proving, documenting, or tightening that existing behavior over duplicating capability or overengineering a parallel website mechanism/
|
||||
);
|
||||
expect(
|
||||
"barebones no CSS",
|
||||
/barebones functional HTML with no CSS/
|
||||
);
|
||||
expect(
|
||||
"future hosted business scope",
|
||||
/Billing is not part of the MVP[\s\S]*Paid checkout, paid-plan management, upgrade flows, hosted support tooling, a full hosted admin console, broad moderation workflows/
|
||||
);
|
||||
expect(
|
||||
"billing is not MVP website work",
|
||||
/Do not build billing\/upgrade flows into the minimal website for this MVP/
|
||||
);
|
||||
expect(
|
||||
"billing-only surfaces are postponed",
|
||||
/If a website route, API, database field, control, or acceptance item exists only for billing, paid plans, hosted business operations, broad admin\/moderation, team management, provider setup, secret management, durable account\/business-process management, or any similarly future hosted-business concern, postpone it instead of building it for this MVP\./
|
||||
);
|
||||
expect(
|
||||
"billing plan flags are placeholders",
|
||||
/Design-document references to billing, paid plans, or plan flags are future metadata placeholders; they do not require MVP website routes, database fields, UI controls, CLI commands, coordinator routes, or service logic/
|
||||
);
|
||||
assert.doesNotMatch(source, /community-tier/, "use `community tier`, not `community-tier`");
|
||||
|
||||
const lines = criterionLines();
|
||||
assert(lines.length > 0, "website inventory must contain status-prefixed checklist items");
|
||||
for (const line of lines) {
|
||||
assert.match(
|
||||
line,
|
||||
/^- \[[ x]\] \*\*(Passed|Partial|Open|Postponed)(?: \([^)]+\))?:\*\*/,
|
||||
`website inventory item lacks an explicit status prefix: ${line}`
|
||||
);
|
||||
}
|
||||
|
||||
for (const [name, pattern] of [
|
||||
["CLI login command", /`disasmer login \[--browser\] \[--coordinator <url>\]`/],
|
||||
["CLI auth status command", /`disasmer auth status`/],
|
||||
["CLI key command", /`disasmer key add --public-key <pubkey>`/],
|
||||
["CLI project init command", /`disasmer project init`/],
|
||||
["CLI node enroll command", /`disasmer node enroll --coordinator <url> --ttl-seconds <seconds>`/],
|
||||
["CLI process status command", /`disasmer process status`/],
|
||||
["CLI task list command", /`disasmer task list`/],
|
||||
["CLI DAP command", /`disasmer dap`/],
|
||||
["CLI quota command", /`disasmer quota status`/],
|
||||
["CLI admin status command", /`disasmer admin status`/],
|
||||
]) {
|
||||
expect(name, pattern);
|
||||
}
|
||||
|
||||
for (const [name, pattern] of [
|
||||
["website default project is open", /- \[ \] \*\*Open:\*\* land in their default project\./],
|
||||
["website node attach is open", /- \[ \] \*\*Open:\*\* copy a node attach command\./],
|
||||
["website process view is open", /- \[ \] \*\*Open:\*\* see the single current virtual process\./],
|
||||
["website logs are open", /- \[ \] \*\*Open:\*\* see recent bounded logs\./],
|
||||
["website artifact download is open", /- \[ \] \*\*Open:\*\* securely download an available best-effort retained artifact\./],
|
||||
["website keys are partial through CLI", /- \[ \] \*\*Partial:\*\* manage\/revoke public keys or know the CLI command to do so\./],
|
||||
]) {
|
||||
expect(name, pattern);
|
||||
}
|
||||
|
||||
console.log("Website inventory contract smoke passed");
|
||||
Loading…
Add table
Add a link
Reference in a new issue