Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/lib/src/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,21 @@ const FAILING: Record<string, { unit: (deviations?: string[]) => Facts; problem:
unit: () => repo({ marker: { problem: 'PLEXUS.md: no frontmatter: expected a `---` block at the top' } }),
problem: /^PLEXUS\.md: no frontmatter/,
},
'PLX-Repo/Verbs': {
'PLX-Repo/Hooks': {
unit: (deviations = []) =>
repo({
tasks: { names: VERBS.filter((v) => v !== 'build') },
hk: ['pre-commit'],
marker: { declaration: { deviations, body: reasoned(deviations) } },
}),
problem: /^no root mise task `build`: add one, a no-op that passes/,
problem: /^hk\.pkl wires no `pre-push` hook$/,
},
'PLX-Repo/Hooks': {
'PLX-Repo/Verbs': {
unit: (deviations = []) =>
repo({
hk: ['pre-commit'],
tasks: { names: VERBS.filter((v) => v !== 'build') },
marker: { declaration: { deviations, body: reasoned(deviations) } },
}),
problem: /^hk\.pkl wires no `pre-push` hook$/,
problem: /^no root mise task `build`: add one, a no-op that passes/,
},
'PLX-App/Marker': {
unit: (d) => app(undefined, {}, d),
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ interface AppCheck {
/** Every requirement doctor checks, by name: what the contract pages list, in their order. */
export const CHECKS: Readonly<Record<string, RepoCheck | AppCheck | UnitCheck>> = {
'PLX-Repo/Marker': { binds: 'repo', check: repoMarker },
'PLX-Repo/Verbs': { binds: 'repo', check: verbs },
'PLX-Repo/Hooks': { binds: 'repo', check: hooks },
'PLX-Repo/Verbs': { binds: 'repo', check: verbs },
'PLX-App/Marker': { binds: 'app', check: appMarker },
'PLX-App/Compose': { binds: 'app', check: composeFile },
'PLX-App/TenantLabel': { binds: 'app', check: onCompose(tenantLabel) },
Expand Down
4 changes: 3 additions & 1 deletion packages/lib/src/testing/doctor-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ set to a compendium checkout it reads the pages themselves instead.

`plx doctor` checks `PLX-Repo/Marker`.

`plx doctor` checks of `PLX-Repo/Verbs` that `dev`, `build`, `check`, `test` and `e2e` exist as root mise tasks and that no `verify` is left, not what they run, in which order, or whether they pass, and of `PLX-Repo/Hooks` that `hk.pkl` wires a pre-commit hook and a pre-push hook, not what either runs.
`plx doctor` checks of `PLX-Repo/Hooks` that `hk.pkl` wires a pre-commit hook and a pre-push hook, written literally in its `hooks` block, not what either runs.

`plx doctor` checks of `PLX-Repo/Verbs` that `dev`, `build`, `check`, `test` and `e2e` exist as root mise tasks and that no `verify` is left, not what they run, in which order, or whether they pass.

`plx doctor` checks `PLX-App/Marker`.

Expand Down
Loading