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
17 changes: 17 additions & 0 deletions .github/workflows/dependency-completed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Notify dependency completion
on:
workflow_run:
workflows: [Check]
types: [completed]
permissions:
contents: read
actions: read
pull-requests: read
jobs:
notify:
if: github.event.workflow_run.conclusion == 'success'
uses: lapismd/dependency-automation/.github/workflows/completion.yml@92e3e55d174498916c134f950850e1d572656cab
with:
automation-ref: 92e3e55d174498916c134f950850e1d572656cab
secrets:
app-private-key: ${{ secrets.LAPIS_DEPENDENCY_APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"check:architecture": "tsx ./scripts/check-architecture.ts",
"check:architecture:baseline": "tsx ./scripts/check-architecture.ts --write-baseline",
"test:node": "node --import tsx --import ./src/test-setup.ts --test 'src/**/*.spec.ts'",
"test:architecture": "node --import tsx --test ./tests/architecture.test.ts",
"test:architecture": "node --import tsx --test ./tests/architecture.test.ts ./tests/dependency-completion.test.ts",
"test:workspace": "node --import tsx --test ./packages/workspace-tools/src/workspace-tools.test.ts",
"test:all": "pnpm run test:workspace && pnpm run test:architecture && pnpm run test:node",
"test": "pnpm run build && pnpm run test:all",
Expand Down
37 changes: 37 additions & 0 deletions spec/records/2026-11-17-shared-completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Shared completion adoption

SV-ARCH-010 retains the existing Node-only Check workflow and tag/OIDC publisher.
There are no Lapis npm dependency inputs in the public root or private workspace
manifest. No synthetic Core pin, Changesets job, package bump or publication is
introduced. The functional no-input contract test blocks an unqualified future
Lapis dependency addition even when bot specification checks are exempted.

The completion caller pins implementation/policy92e3e55d174498916c134f950850e1d572656cab,
registered in coordinator74. Only successful Check workflow399280612, PR/push,
can provide a hint; source permissions are contents/actions/PR-read and only the
existing explicit App key is passed. No candidate checkout, artifact/cache,
source execution or self-trigger occurs. The existing publisher notifier still
follows actual provenance verification. Existing secret/variable names were
verified without key retrieval, copying or rotation. Hosted read probe and
post-merge completion/no-update reconciliation remain pending.

The new callback test first failed once because the caller was absent; both
focused cases pass after adding it. All normal checks, architecture/runtime
boundaries, Node/workspace tests, canonical specification, build and publint
pass. Two initial canonical-form diagnostics and a wrapped-bullet diagnostic
were corrected without changing enforcement. Source/runtime exports and the
registry dependency graph are unchanged.

Fresh full audit separately records13 pre-existing development-tool findings
(2LOW/4MODERATE/7HIGH), including unfixed picomatch; production audit is clean.
These were not introduced by this workflow slice and are not suppressed. A
compatible tooling-refresh trial did not resolve them; it was discarded,
retaining the original lockfile and declared dependencies. Remediation belongs
to the tracked repository follow-up; this source grants no exception. The
existing required Check workflow has no audit lane, and that gate is unchanged.

The operator requests a final merge pass and gives standing post-merge
activation approval after passing source acceptance. An eligible repository
with no Lapis inputs must report an honest no-op; this does not prove a new
release branch or authorize a fabricated update. Any actual future dependency
intake still needs source qualification and every applicable gate.
12 changes: 12 additions & 0 deletions spec/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,15 @@ The verified release tarball lives under `.release/`; artifact upload explicitly
Configured doctor discovery is extracted into the bounded `doctor-files` command
module. The original doctor module's counted-line budget decreases; the public
Node CLI/build/runtime contract remains unchanged.

## SV-ARCH-010 — Shared dependency completion

**Requirement.** The repository MUST use the reviewed immutable coordinator callback only for
its successful existing Check workflow while preserving the tag/OIDC publisher.

### Acceptance details

- The callback MUST pass only the existing explicit App secret and matching implementation/policy pins, with read-only source permissions and no candidate checkout, cache, artifact or self-trigger.
- The existing verified npm notifier MUST remain after provenance acceptance; this adoption MUST NOT create a version job, release tag or publication.
- The root and private workspace tool currently consume no Lapis npm dependency; a normal functional test MUST fail if that no-update shape changes, requiring source-owned intake qualification before a dependency writer is admitted.
- Activation MAY follow source merge and successful checks under standing operator approval; ordinary reconciliation MUST report an honest no-op while no eligible dependency exists, without manufacturing release intent.
1 change: 1 addition & 0 deletions spec/src/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| SV-GOV-005 | Implemented | `src/validators/book.ts`; `src/validators/qmd.ts`; `.gitignore` |
| SV-GOV-006 | Implemented | `AGENTS.md`; `src/validators/governance.ts` extras |
| SV-GOV-007 | Implemented | `AGENTS.md`; portable published dependency policy |
| SV-ARCH-010 | In progress | Source-owned completion contract test; pinned caller; hosted callback/no-update acceptance pending |
| SV-ARCH-001 | Implemented | `package.json` bin; linked-bin CLI regression; `src/config.ts` |
| SV-ARCH-002 | Implemented | `src/tracked-files.ts` |
| SV-ARCH-003 | Implemented | `src/types.ts`; `src/commands/validate.ts` |
Expand Down
46 changes: 46 additions & 0 deletions tests/dependency-completion.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { test } from "node:test";
const read = (file: string) =>
readFileSync(new URL("../" + file, import.meta.url), "utf8");
test("Spec Validator remains a no-Lapis-input publisher until explicit intake qualification", () => {
for (const file of [
"package.json",
"packages/workspace-tools/package.json",
]) {
const manifest = JSON.parse(read(file));
for (const section of [
"dependencies",
"devDependencies",
"optionalDependencies",
"peerDependencies",
])
assert.deepEqual(
Object.keys(manifest[section] ?? {}).filter((n) =>
/^@(?:lapismd|lapis-notes)\//.test(n),
),
[],
);
}
});
test("completion source is read-only, pinned, successful and cannot load candidate code", () => {
const source = read(".github/workflows/dependency-completed.yml");
assert.match(source, /workflows: \[Check\]/);
assert.match(source, /github.event.workflow_run.conclusion == 'success'/);
const pin = /completion.yml@([a-f0-9]{40})/.exec(source)?.[1];
assert.ok(pin);
assert.match(source, new RegExp(`automation-ref: ${pin}`));
assert.match(
source,
/contents: read\n actions: read\n pull-requests: read/,
);
assert.match(
source,
/app-private-key: \$\{\{ secrets.LAPIS_DEPENDENCY_APP_PRIVATE_KEY \}\}/,
);
assert.doesNotMatch(
source,
/secrets: inherit|actions\/checkout|actions\/cache|download-artifact|: write/,
);
assert.equal((source.match(/Check/g) ?? []).length, 1);
});
Loading