@antelopejs/tooling-configs 0.2.19 → 0.3.1
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/README.md +3 -3
- package/dist/bin/garden.mjs +4 -37
- package/dist/bin/sync.mjs +15 -47
- package/dist/bin/verify.mjs +2404 -2756
- package/dist/{ci-workflow-DVkpwauQ.mjs → ci-workflow-mc0vywUV.mjs} +1 -24
- package/dist/verify/index.d.mts +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,15 +49,15 @@ The AntelopeJS guardrail pack: shared lint, format and dead-code presets, the co
|
|
|
49
49
|
- `--apply` turns `delete_branch_on_merge` on for each repository the `conformance` check reports it off on, and writes nothing else.
|
|
50
50
|
- The `stale-branches` check lists, in one finding per repository, the branches other than the default, `next` and protected ones that head a merged or closed pull request at their current commit, or have no open pull request and no commit for 30 days. A branch that heads or receives an open pull request is never listed. `prunes` holds one `{ repo, branch, reason }` per listed branch, and `--apply-prunes` deletes exactly those refs.
|
|
51
51
|
|
|
52
|
-
`antelopejs-sync`
|
|
52
|
+
Both profiles of `antelopejs-sync` keep the shared CI caller on the job id `ci`, so the check is reported as `ci / checks`. The `ci` job is read-only (`contents: read`) and passes `renovate-sync: false` and `test-job: true`, which runs the tests in their own job (sync adds `test-job: true` to a caller that does not set it and keeps a value the caller set); the `contents: write` and `actions: write` grants that let the Renovate sync push its commit and dispatch the caller live on a separate `renovate-sync` job calling `ci-renovate-sync.yml`, which sync adds when it is missing and never re-pins. Under the full profile it also sets the `docs-files` input of every ci-node caller to the existing `README.md` and `docs` of the root and of each workspace package that is not private, then keeps the caller's other listed paths that still exist. Renaming a caller to `ci` also rewrites `needs:` lists and `needs.<old-id>` reads in expressions, and sync (and `--check`) fails a caller in which a job needs a job that does not exist or reads `needs.<id>` of a job missing from its own `needs:`, since GitHub evaluates that read to null and a gate like `needs.checks.result == 'skipped'` then never fails.
|
|
53
53
|
|
|
54
54
|
## Shared verification skills
|
|
55
55
|
|
|
56
|
-
`antelopejs-sync` writes one shared verification skill into a repository: `verify-interface` for an interface, `verify-module` for an implementation module (inferred from `antelopeJs.implements`) and `verify-template` in a template source repository, which keeps an `.agents/skills/verify-template/` folder (bootstrap one with `--verify template`). `--profile template` infers no kind, because a scaffold ships without `.agents`: it keeps the skill that exists or the one `--verify` names. Pass `--verify interface|module|template` to choose, or `--verify custom` for a repository that keeps its own `.agents/skills/verify-<repo>/`. Sync writes `SKILL.md`, `package.json` and `tsconfig.json` in `.agents/skills/verify-<kind>/` with a `.claude/skills/verify-<kind>` link, and `--check` reports them as drift. The `tsconfig.json` extends the root one with ES module resolution and loads the Node types, so type-aware lint sees the real types of the repository's files there, Node APIs included. It never touches the repository's own layer beside them: `verify.config.ts
|
|
56
|
+
`antelopejs-sync` writes one shared verification skill into a repository: `verify-interface` for an interface, `verify-module` for an implementation module (inferred from `antelopeJs.implements`) and `verify-template` in a template source repository, which keeps an `.agents/skills/verify-template/` folder (bootstrap one with `--verify template`). `--profile template` infers no kind, because a scaffold ships without `.agents`: it keeps the skill that exists or the one `--verify` names. Pass `--verify interface|module|template` to choose, or `--verify custom` for a repository that keeps its own `.agents/skills/verify-<repo>/`. Sync writes `SKILL.md`, `package.json` and `tsconfig.json` in `.agents/skills/verify-<kind>/` with a `.claude/skills/verify-<kind>` link, and `--check` reports them as drift. The `tsconfig.json` extends the root one with ES module resolution and loads the Node types, so type-aware lint sees the real types of the repository's files there, Node APIs included. It never touches the repository's own layer beside them: `verify.config.ts` and `features/`, which holds an index in `features/README.md` and one file per feature.
|
|
57
57
|
|
|
58
58
|
`antelopejs-sync` also installs the `technical-writing` and `unslop` skills in every full-profile repository and in a template source. Each is `.agents/skills/<name>/SKILL.md` with a `.claude/skills/<name>` link. The text is vendored unchanged from Upd4ting/agent-config `claude/skills/<name>/SKILL.md` at commit 4e0a848, and `--check` reports an edited file as drift. Write documentation with them: `technical-writing` picks the page's mode and sets the sentence rules, and `unslop` lists the patterns to cut.
|
|
59
59
|
|
|
60
|
-
Every deterministic step of a verification is an `antelopejs-verify` command: `map`, `plan`, `new`, `doctor`, `journey`, `formal`, `doors`, `
|
|
60
|
+
Every deterministic step of a verification is an `antelopejs-verify` command: `map`, `plan`, `new`, `doctor`, `journey`, `formal`, `doors`, `clean`, `verdict` and `publish`. The synced `SKILL.md` documents each one for the agent that verifies.
|
|
61
61
|
|
|
62
62
|
The verify skills drive a browser with `playwright-core`. [Browser driver for the verify skills](./docs/browser-driver.md) records why, with the measured speed, CPU and memory.
|
|
63
63
|
|
package/dist/bin/garden.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as isString, c as object, d as optTime, f as parseJson, h as time, i as isObject, l as optNum, m as strings, n as children, o as list, p as str, r as flag, s as num, t as child, u as optStr } from "../json-CG2L7YFl.mjs";
|
|
3
3
|
import { n as runCliAsync } from "../cli-4Tv71vYk.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { c as ciRenovateSyncCallers, i as CI_RENOVATE_SYNC_REF, n as CI_NODE_REF, r as CI_PATH, s as ciNodeCallers, t as CI_CONTEXT } from "../ci-workflow-mc0vywUV.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
@@ -635,37 +635,6 @@ async function latestReport(context, repo, name) {
|
|
|
635
635
|
const archive = await context.api.bytes(`/repos/${ORG}/${repo}/actions/artifacts/${latest.id}/zip`);
|
|
636
636
|
return object(parseJson(firstZipEntry(archive)), name);
|
|
637
637
|
}
|
|
638
|
-
function survivors(report) {
|
|
639
|
-
const files = object(report.files ?? {}, "files");
|
|
640
|
-
return Object.keys(files).map((file) => {
|
|
641
|
-
const mutants = children(object(files[file], file), "mutants");
|
|
642
|
-
return {
|
|
643
|
-
file,
|
|
644
|
-
survived: mutants.filter((mutant) => optStr(mutant, "status") === "Survived").length,
|
|
645
|
-
total: mutants.length
|
|
646
|
-
};
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
const mutation = {
|
|
650
|
-
id: "mutation",
|
|
651
|
-
async run(context) {
|
|
652
|
-
if (!await context.exists(WORKFLOWS_REPO, ".github/workflows/mutation.yml")) return skip("AntelopeJS/.github has no mutation.yml yet");
|
|
653
|
-
const repos = (await context.scope()).filter((repo) => repo.tier === "N1" || repo.tier === "N2");
|
|
654
|
-
const findings = [];
|
|
655
|
-
let reports = 0;
|
|
656
|
-
for (const repo of repos) {
|
|
657
|
-
const report = await latestReport(context, repo.name, "mutation-report");
|
|
658
|
-
if (report === void 0) continue;
|
|
659
|
-
reports++;
|
|
660
|
-
for (const { file, survived, total } of survivors(report)) if (survived > 0) findings.push(finding({
|
|
661
|
-
repo: repo.name,
|
|
662
|
-
check: "mutation",
|
|
663
|
-
subject: file
|
|
664
|
-
}, `${survived} of ${total} mutants survive in ${file}.`, `Tests kill the surviving mutants of ${file}, or Stryker ignores them with a reason.`));
|
|
665
|
-
}
|
|
666
|
-
return reports ? found(findings) : skip("no mutation-report artifact exists in any N1 or N2 repository yet");
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
638
|
const linkRot = {
|
|
670
639
|
id: "link-rot",
|
|
671
640
|
async run(context) {
|
|
@@ -1015,7 +984,7 @@ const CHECK = "next-governance";
|
|
|
1015
984
|
const ACTIONS_APP = 15368;
|
|
1016
985
|
const ADMIN_ROLE = 5;
|
|
1017
986
|
const MAINTAIN_BLOCKED = "altabmachine";
|
|
1018
|
-
const
|
|
987
|
+
const CHECKS_CONTEXTS = [CI_CONTEXT, "checks"];
|
|
1019
988
|
const VERIFICATION_SKILL = /(?:^|\/)(?:\.agents\/skills|\.claude\/skills|skills)\/[^/]*verif[^/]*\/SKILL\.md$/i;
|
|
1020
989
|
function branchTargets(ruleset, branch) {
|
|
1021
990
|
return ruleset.includes.some((ref) => ref === `refs/heads/${branch}` || ref === "~DEFAULT_BRANCH" && branch !== "next");
|
|
@@ -1058,8 +1027,7 @@ function branchFindings(repo, branch, sets) {
|
|
|
1058
1027
|
subject: `${branch}:${subject}`
|
|
1059
1028
|
}, evidence, `The ${branch} rulesets match the Next channel merge policy.`, urgent ? "urgent" : "normal"));
|
|
1060
1029
|
const contexts = requiredContexts(hit);
|
|
1061
|
-
if (!contexts.includes(
|
|
1062
|
-
if (!REQUIRED_CONTEXTS[0].some((name) => contexts.includes(name))) report("checks", `No ruleset on ${branch} requires ${CI_CONTEXT} from GitHub Actions.`, false);
|
|
1030
|
+
if (!CHECKS_CONTEXTS.some((name) => contexts.includes(name))) report("checks", `No ruleset on ${branch} requires ${CI_CONTEXT} from GitHub Actions.`, false);
|
|
1063
1031
|
const reviews = pullRules(hit);
|
|
1064
1032
|
if (reviews.some((rule) => (optNum(rule, "required_approving_review_count") ?? 0) > 0 || flag(rule, "require_code_owner_review") || flag(rule, "require_last_push_approval"))) report("review-rule", `A ruleset on ${branch} requires a review.`, true);
|
|
1065
1033
|
if (!reviews.length || !reviews.every((rule) => strings(rule, "allowed_merge_methods").join() === "squash")) report("squash-only", `${branch} does not allow squash merges only.`, false);
|
|
@@ -1116,7 +1084,7 @@ const nextGovernance = {
|
|
|
1116
1084
|
if (value !== void 0) values.set(repo.name, value);
|
|
1117
1085
|
return [];
|
|
1118
1086
|
});
|
|
1119
|
-
if (!values.size) return skip(`${AUTOMERGE} exists on no repository yet
|
|
1087
|
+
if (!values.size) return skip(`${AUTOMERGE} exists on no repository yet.`);
|
|
1120
1088
|
return perRepo(repos.filter((repo) => values.has(repo.name)), (repo) => governed(context, repo, values.get(repo.name) ?? ""));
|
|
1121
1089
|
}
|
|
1122
1090
|
};
|
|
@@ -1524,7 +1492,6 @@ const CHECKS = [
|
|
|
1524
1492
|
aiApps,
|
|
1525
1493
|
orbSecrets,
|
|
1526
1494
|
packageSize,
|
|
1527
|
-
mutation,
|
|
1528
1495
|
templateBehindLatest,
|
|
1529
1496
|
templateMembership,
|
|
1530
1497
|
staleRegistry,
|
package/dist/bin/sync.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { t as runCli } from "../cli-4Tv71vYk.mjs";
|
|
|
7
7
|
import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
|
|
8
8
|
import { i as recordedRelease, t as measureBaseline } from "../ratchet-BAcLRYuM.mjs";
|
|
9
9
|
import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-C0SkPO5R.mjs";
|
|
10
|
-
import { a as
|
|
10
|
+
import { a as ciWorkflow, c as ciRenovateSyncCallers, l as hasChecksWorkflow, o as MISSING_CHECKS_WORKFLOW, r as CI_PATH, s as ciNodeCallers } from "../ci-workflow-mc0vywUV.mjs";
|
|
11
11
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { dirname, join, resolve } from "node:path";
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
@@ -715,7 +715,7 @@ function planWritingSkills(root, profile, kind) {
|
|
|
715
715
|
/** The kind-specific text of each shared skill. */
|
|
716
716
|
const KIND_TEXT = {
|
|
717
717
|
interface: {
|
|
718
|
-
description: "Drive this AntelopeJS interface the way a module author does: pack it, load it in `ajs project dev` next to a stub provider wired through ImplementInterface and a consumer, call every declared function through core, and check the minor-bump rule against the published version. Use to prove a change to the interface works before merge, to verify a PR
|
|
718
|
+
description: "Drive this AntelopeJS interface the way a module author does: pack it, load it in `ajs project dev` next to a stub provider wired through ImplementInterface and a consumer, call every declared function through core, and check the minor-bump rule against the published version. Use to prove a change to the interface works before merge, or to verify a PR.",
|
|
719
719
|
title: "Verify interface",
|
|
720
720
|
user: "The user of an interface is a module author: one module implements it, others import it and call its functions through core.",
|
|
721
721
|
launch: "`new` runs the setup (`pnpm run build` by default), then packs the interface with `pnpm pack` and extracts it, so journeys load what npm would publish, `files` and `exports` included. Every `services` entry of `verify.config.ts` then starts in its own Docker container on a free loopback port, as for a module.",
|
|
@@ -731,14 +731,10 @@ const KIND_TEXT = {
|
|
|
731
731
|
- \`interface.calls["<entry>:<path>"]\` calls a plain exported function from the consumer and states the value it must return.
|
|
732
732
|
- \`interface.providerSide["<entry>:<path>"]\` names a function only providers call, with the reason.`,
|
|
733
733
|
smoke: "`every-function`",
|
|
734
|
-
gotchas: [
|
|
735
|
-
"A function the consumer awaits forever, such as a getter no provider resolved, fails after 15 seconds with a `Timeout` value.",
|
|
736
|
-
"`minor-bump` needs the npm registry. Without it the journey is not verified, never passed.",
|
|
737
|
-
"A containment journey of a Data or Format door must check what that door's seeded patch changes, for example the arguments the stub provider logged. `containments` reports one that still passes with its door as `MISSED`."
|
|
738
|
-
]
|
|
734
|
+
gotchas: ["A function the consumer awaits forever, such as a getter no provider resolved, fails after 15 seconds with a `Timeout` value.", "`minor-bump` needs the npm registry. Without it the journey is not verified, never passed."]
|
|
739
735
|
},
|
|
740
736
|
module: {
|
|
741
|
-
description: "Drive this AntelopeJS implementation module the way an app developer does: install it as `local` in a fixture project, run its backing services in Docker on free ports, call its interfaces from a consumer module and read stored state back with the service's native client. Use to prove a change to the module works before merge, to verify a PR
|
|
737
|
+
description: "Drive this AntelopeJS implementation module the way an app developer does: install it as `local` in a fixture project, run its backing services in Docker on free ports, call its interfaces from a consumer module and read stored state back with the service's native client. Use to prove a change to the module works before merge, or to verify a PR.",
|
|
742
738
|
title: "Verify module",
|
|
743
739
|
user: "The user of a module is an app developer: they add it to `antelope.config.ts`, configure it, and other modules call the interfaces it implements.",
|
|
744
740
|
launch: "`new` runs the setup (`pnpm run build` by default), then starts every `services` entry of `verify.config.ts` in its own Docker container on a free loopback port, named `<prefix>-<repo>-<service>-<run>` (`VERIFY_CONTAINER_PREFIX`, default `verify`), and waits for each readiness command. A provider with sandbox keys in `saas.env` records the missing ones.",
|
|
@@ -748,14 +744,10 @@ const KIND_TEXT = {
|
|
|
748
744
|
- \`saas: { env, sandbox }\`: a SaaS module runs against the provider's sandbox with keys from these environment variables. Without every key, each journey is NOT VERIFIED and so is the verdict, never PASS or PASS+NOTES.
|
|
749
745
|
- \`journeys\`: the module's own journeys. Each writes through the module with \`context.call(...)\` and reads the result back with \`context.native(...)\` (\`redis-cli\`, \`mongosh\`, \`psql\`, the Mailpit API) inside the service container.`,
|
|
750
746
|
smoke: "`module-dev` and one write read back through the native client",
|
|
751
|
-
gotchas: [
|
|
752
|
-
"Every container is the run's own. Never point a journey at a shared instance such as a developer's local database.",
|
|
753
|
-
"A sandbox key missing from the environment is a NOT VERIFIED verdict, which sets status `verify` to `error`.",
|
|
754
|
-
"A containment journey of a Data or Format door must read back, through the native client, the state that door's seeded patch corrupts. `containments` reports one that still passes with its door as `MISSED`."
|
|
755
|
-
]
|
|
747
|
+
gotchas: ["Every container is the run's own. Never point a journey at a shared instance such as a developer's local database.", "A sandbox key missing from the environment is a NOT VERIFIED verdict, which sets status `verify` to `error`."]
|
|
756
748
|
},
|
|
757
749
|
template: {
|
|
758
|
-
description: "Drive this AntelopeJS template the way a new user does: scaffold a project with `ajs project init` from an offline interfaces manifest, install it, run its own `pnpm run checks`, run `ajs project dev --watch` and hit its welcome page, endpoint or ready line. Use to prove a change to the template works before merge, to verify a PR, to run the release canary
|
|
750
|
+
description: "Drive this AntelopeJS template the way a new user does: scaffold a project with `ajs project init` from an offline interfaces manifest, install it, run its own `pnpm run checks`, run `ajs project dev --watch` and hit its welcome page, endpoint or ready line. Use to prove a change to the template works before merge, to verify a PR, or to run the release canary.",
|
|
759
751
|
title: "Verify template",
|
|
760
752
|
user: "The user of a template is someone running `ajs project init --template`: they get a copy of the whole repository and expect it to install, pass its checks and run.",
|
|
761
753
|
launch: "`new` copies the working tree, uncommitted changes included, into a local git repository, and lists it in an offline interfaces manifest (`templates`, or `projectTemplates` when `template.project` is set) under `template.name`. Journeys point `ajs config set git` at it, so no step reaches GitHub. Every `services` entry of `verify.config.ts` then starts in its own Docker container on a free loopback port, as for a module.",
|
|
@@ -766,11 +758,7 @@ const KIND_TEXT = {
|
|
|
766
758
|
- \`services\`: image, port, readiness command and \`reset\`, as for a module. \`new\` starts them in Docker on free ports; a journey reads them with \`context.service(name)\` and \`context.native(...)\` and passes their endpoints to the project it starts through the \`env\` of \`context.dev\`.
|
|
767
759
|
- \`template.probe\`: \`path\`, \`status\` and \`body\` for an HTTP welcome page or endpoint, or \`log\` and \`settleMs\` for a template that serves nothing.`,
|
|
768
760
|
smoke: "`scaffold-dev` and `scaffold-checks`",
|
|
769
|
-
gotchas: [
|
|
770
|
-
"`ajs` copies the whole repository, `.agents/` and `.claude/` included, so the scaffolded project carries this skill too.",
|
|
771
|
-
"Every file a user gets is user-facing here, tests included; only `.agents/`, `.claude/` and `.github/` are not.",
|
|
772
|
-
"A containment journey of a Data or Format door must check the scaffolded files or endpoint that door's seeded patch changes. `containments` reports one that still passes with its door as `MISSED`."
|
|
773
|
-
]
|
|
761
|
+
gotchas: ["`ajs` copies the whole repository, `.agents/` and `.claude/` included, so the scaffolded project carries this skill too.", "Every file a user gets is user-facing here, tests included; only `.agents/`, `.claude/` and `.github/` are not."]
|
|
774
762
|
}
|
|
775
763
|
};
|
|
776
764
|
//#endregion
|
|
@@ -836,24 +824,23 @@ ${BIN} clean <run>
|
|
|
836
824
|
## The repository's own layer
|
|
837
825
|
|
|
838
826
|
- \`verify.config.ts\` default-exports a \`VerifyConfig\` from \`@antelopejs/tooling-configs/verify\`:
|
|
839
|
-
- \`doors\`: one entry per door kind (\`data\`, \`format\`, \`contract\`, \`outbound\`, \`exposure\`, \`publish\`), each \`null\` when it cannot apply or \`{ globs, funnels,
|
|
840
|
-
- \`journeys\`: the repository's journeys by id, each \`{ title, entryPoint, run(context) }\`, using the check helpers the same import exports. A check states what the product must do; an environment that went away is never a failing check. When a journey fails, the harness reruns each service's readiness command, up to four times over about 3.5 s, and looks at every \`ajs project dev\` the journey started, its own readiness probe included. The journey ends NOT VERIFIED, not FAIL, when a service still fails every rerun, an app was killed by SIGKILL, SIGTERM, SIGHUP or SIGINT that the harness did not send, or the app the harness started failed to bind the port the harness gave it (\`EADDRINUSE\` naming that port). An app that exits on its own with an exit code, one that crashes by another signal such as SIGABRT or SIGSEGV, and one that logs \`EADDRINUSE\` for any other port are the product's failure. A
|
|
827
|
+
- \`doors\`: one entry per door kind (\`data\`, \`format\`, \`contract\`, \`outbound\`, \`exposure\`, \`publish\`), each \`null\` when it cannot apply or \`{ globs, funnels, why }\`.
|
|
828
|
+
- \`journeys\`: the repository's journeys by id, each \`{ title, entryPoint, run(context) }\`, using the check helpers the same import exports. A check states what the product must do; an environment that went away is never a failing check. When a journey fails, the harness reruns each service's readiness command, up to four times over about 3.5 s, and looks at every \`ajs project dev\` the journey started, its own readiness probe included. The journey ends NOT VERIFIED, not FAIL, when a service still fails every rerun, an app was killed by SIGKILL, SIGTERM, SIGHUP or SIGINT that the harness did not send, or the app the harness started failed to bind the port the harness gave it (\`EADDRINUSE\` naming that port). An app that exits on its own with an exit code, one that crashes by another signal such as SIGABRT or SIGSEGV, and one that logs \`EADDRINUSE\` for any other port are the product's failure. A change that takes its own service down still reads as an outage: the service stays down, so the journey is NOT VERIFIED. For anything else the journey depends on, such as a process it started with \`context.command\` or an outside endpoint, probe it when a check fails and call \`context.notVerified(reason)\` when it no longer answers.
|
|
841
829
|
- \`env\`, \`setup\` (commands replacing the build), \`userFacing\` (globs replacing the kind's default) and \`formal\` (formal checks: \`name\`, \`covers\`, \`command\`, \`violation\`, and optionally \`behaviour\` and \`baseCommand\`).
|
|
842
830
|
${text.layer}
|
|
831
|
+
- \`features/README.md\`: the index of the features; \`map\` does not read it as a feature.
|
|
843
832
|
- \`features/<feature>.md\`: frontmatter lists \`covers:\` (source globs), \`docs:\` (pages a verdict judges) and \`journeys:\`, then the sections Sub-features, How to get to it (user POV), Driving it with antelopejs-verify, and Gotchas. \`features/smoke.md\` covers nothing and runs on every verdict; here it runs ${text.smoke}.
|
|
844
|
-
- \`seeded-breaks/<feature>.patch\`: one minimal product bug per feature that its journeys must catch.
|
|
845
|
-
- \`seeded-doors/<kind>.patch\`: one change per door kind that applies. A Data or Format door's patch must break what its containment journeys check.
|
|
846
833
|
|
|
847
834
|
\`\`\`bash
|
|
848
835
|
${BIN} map
|
|
849
836
|
\`\`\`
|
|
850
837
|
|
|
851
|
-
\`map\` fails on a user-facing file no feature covers, a feature without journeys
|
|
838
|
+
\`map\` fails on a user-facing file no feature covers, a feature without journeys or docs, an unknown journey, and a \`verify.config.ts\` journey no feature names.
|
|
852
839
|
|
|
853
840
|
## Verdict rules
|
|
854
841
|
|
|
855
842
|
1. **Run every feature whose \`covers:\` globs the diff touches, plus \`smoke\`.** \`plan\` prints that list as \`run\`.
|
|
856
|
-
2. **An unmapped surface fails the verdict.** A changed user-facing file no feature covers needs a feature entry
|
|
843
|
+
2. **An unmapped surface fails the verdict.** A changed user-facing file no feature covers needs a feature entry and its journeys in the same PR.
|
|
857
844
|
3. **Every registered journey of a feature in \`run\` must have run and passed.** Run whole features. A journey that could not reach the product, or whose environment went away during it, is NOT VERIFIED, and so is the verdict, whatever else passed: never PASS and never PASS+NOTES. Every journey result in the run's evidence counts, also for a feature outside \`run\`: a failed one fails the verdict, because it shows a \`covers:\` glob that misses what the diff broke. A NOT VERIFIED one outside \`run\` is listed under Not verified and caps the result at PASS+NOTES. A journey outside \`run\` that never ran is not required.
|
|
858
845
|
4. **Docs.** Judge every \`docs:\` page of a touched feature against what the journeys showed. A stale page fails the verdict.
|
|
859
846
|
5. **Formal checks.** \`${BIN} formal <run>\` runs every formal check of \`verify.config.ts\` that covers the diff, or whose own \`files\` the diff changes, and records it under \`evidence/formal/<name>/\`. For each one it decides, without judgement, whether the diff changed what the covered code does. \`emit\` (the default) compares the structure of the covered files' JavaScript on the base and on HEAD: node kinds, names and literal values, leaving out types, comments, formatting, parentheses and \`export\` keywords. Each use of an imported binding stands for its origin (the resolved module and the imported name), so an import retargeted to another module or alias counts as changed; a function declaration refers to the top-level variables and classes of its own file by file and name, so moving it next to a different variable of the same name counts as changed. Exports are keyed by the origin they export, so a re-export or an \`export { f as run }\` retargeted to another binding counts as changed. Each file must keep its top-level statements and its side-effect imports in order; function declarations, which are hoisted, may move between covered files with their imports. So a type-only edit, a reformat or a moved function declaration counts as unchanged, while reordering statements or moving any other statement counts as changed. \`emit\` judges behaviour, not the public surface: exports are the api-diff's job. \`probe\` runs the check's \`behaviour.command\` with a worktree of each commit and compares what it prints. Then:
|
|
@@ -862,7 +849,7 @@ ${BIN} map
|
|
|
862
849
|
- when the covered behaviour changed, or the diff changed the check's own \`files\`, \`formal\` also runs the check on the base (\`baseCommand\` when set). A rule the base broke counts as fixed only when HEAD reports it passing (\`passing\`); a rule the base broke that HEAD does not report at all fails the verdict. A change that leaves no violated rule passes.
|
|
863
850
|
|
|
864
851
|
The decision never reads the check's output, so a model whose rule names stay the same still fails on a changed behaviour. It is conservative: a local rename or an extracted helper counts as changed, and code outside \`covers\` is invisible to it. \`--all\` also runs the checks that do not cover the diff, without gating.
|
|
865
|
-
6. **One-way doors.** The section comes right after the result line and is mandatory. \`${BIN} doors\` prints the \`One-way-door:\` line of the diff. Every file the path rules flag needs a door row or a false positive with its reason.
|
|
852
|
+
6. **One-way doors.** The section comes right after the result line and is mandatory. \`${BIN} doors\` prints the \`One-way-door:\` line of the diff. Every file the path rules flag needs a door row or a false positive with its reason.
|
|
866
853
|
7. **Result.** FAIL if any rule fails. NOT VERIFIED when any journey of a required feature is NOT VERIFIED, for example a SaaS module run without its sandbox keys, however many other journeys passed. PASS+NOTES when everything required ran and passed but the judgement lists something no journey reached or something the owner should look at. PASS otherwise.
|
|
867
854
|
|
|
868
855
|
Write your judgement to \`<run>/evidence/judgement.json\`:
|
|
@@ -881,7 +868,7 @@ Write your judgement to \`<run>/evidence/judgement.json\`:
|
|
|
881
868
|
}
|
|
882
869
|
\`\`\`
|
|
883
870
|
|
|
884
|
-
A door row is \`{ "kind", "location", "irreversible", "containment"
|
|
871
|
+
A door row is \`{ "kind", "location", "irreversible", "containment" }\`, where \`containment\` says what limits the damage. Then render and publish:
|
|
885
872
|
|
|
886
873
|
\`\`\`bash
|
|
887
874
|
${BIN} verdict <run> --pr <n>
|
|
@@ -892,17 +879,7 @@ ${BIN} publish <run> --pr <n>
|
|
|
892
879
|
|
|
893
880
|
## Trust
|
|
894
881
|
|
|
895
|
-
The skill is not Trusted yet. It becomes Trusted when it
|
|
896
|
-
|
|
897
|
-
## Seeded breaks and doors
|
|
898
|
-
|
|
899
|
-
\`\`\`bash
|
|
900
|
-
${BIN} seeded <feature...>
|
|
901
|
-
${BIN} seeded-doors
|
|
902
|
-
${BIN} containments
|
|
903
|
-
\`\`\`
|
|
904
|
-
|
|
905
|
-
\`seeded\` runs each feature's journeys in a scratch worktree of HEAD without the patch, as the control, and with \`seeded-breaks/<feature>.patch\` applied. It prints \`CAUGHT\` only when a journey that passes in the control fails one of its checks with the patch. Journeys failing in the control, failures without a failing check and NOT VERIFIED journeys do not count. A break no journey caught is \`NOT VERIFIED\` when a journey could not reach the product in either run, for example because a service went away, and \`MISSED\` otherwise. The command exits 1 on anything but \`CAUGHT\`. \`seeded-doors\` prints \`FLAGGED\` when the path rules flag each patch with its own kind. \`containments\` runs every Data and Format containment journey in a scratch worktree of HEAD without the door, as the control, and with \`seeded-doors/<kind>.patch\` applied. It prints \`CONTAINED\` only when the journey passes in the control and fails one of its checks with the door. \`MISSED\` means it passes with its door, \`UNPROVEN\` that it fails in the control or ends without a failing check, and \`NO-DOOR\` that the kind has no seeded door; the command exits 1 on anything but \`CONTAINED\`.
|
|
882
|
+
The skill is not Trusted yet. It becomes Trusted when it passes a shadow run of 10 consecutive agent PRs and its last maintain pass is newer than the last change to the repository or its \`@antelopejs\` dependencies and at most 30 days old.
|
|
906
883
|
|
|
907
884
|
## Gotchas
|
|
908
885
|
|
|
@@ -1151,14 +1128,6 @@ const MANAGED_ARTIFACTS = [
|
|
|
1151
1128
|
notes: []
|
|
1152
1129
|
})
|
|
1153
1130
|
},
|
|
1154
|
-
{
|
|
1155
|
-
path: MUTATION_PATH,
|
|
1156
|
-
profiles: ["full"],
|
|
1157
|
-
desired: (_current, context) => ({
|
|
1158
|
-
content: mutationCaller(context.packageName),
|
|
1159
|
-
notes: []
|
|
1160
|
-
})
|
|
1161
|
-
},
|
|
1162
1131
|
{
|
|
1163
1132
|
path: "package.json",
|
|
1164
1133
|
profiles: ["full", "template"],
|
|
@@ -1313,7 +1282,6 @@ function repositoryContext(root, current, profile, verificationSkill) {
|
|
|
1313
1282
|
claude: profile === "full" ? claudeProse(root, current) : "",
|
|
1314
1283
|
baseline: "",
|
|
1315
1284
|
suppressionBudget: profile === "full" ? adoptedBudget(root, current.get(SUPPRESSIONS_FILE)) : "",
|
|
1316
|
-
packageName: manifest.name ?? "",
|
|
1317
1285
|
managesCi: current.has(".github/workflows/ci.yml") || !hasChecksWorkflow(root),
|
|
1318
1286
|
verificationSkill: profile === "template" && inScaffoldExcludedPath(verificationSkill) ? void 0 : verificationSkill,
|
|
1319
1287
|
glossary: ["GLOSSARY.md", "docs/GLOSSARY.md"].find((file) => existsSync(join(root, file))),
|