Repository navigation
Gate bundle build on the Composition check #52
Copy link
Copy link
Closed
Labels
ready-for-agentFully specified and ready for an AFK agentFully specified and ready for an AFK agent
Description
Parent
Spec: #49 (M1 — Shell and Catalog). Milestone: #48.
What to build
A Bundle that builds is a Bundle that can compose: bundle build runs the Composition check and refuses on any error-severity finding.
- The Workflow Module owns the Composition check over a validated manifest: every required artifact is bound earlier by a producer or launch input with a matching type; every Prompt slot names an artifact the Step requires, with unknown or malformed slots failing; every Repeat group's verdict is bound before entry; every
reviewCheckpointis a positive-integer interval under Secant's safety ceiling with a plain-text message; every schema-bearing declaration names a valid schema asset (UTF-8 JSON,$refonly within that document); every supported platform resolves exactly one command invocation; every referenced asset exists with the right kind. - Findings carry a stable code, severity, the Step or field they point at, and a human explanation.
buildreturns them alongside identity and digest; the headless client prints them in plain text, and any error-severity finding exits non-zero with no output file written. - Focused negative cases over hand-written manifests cover each rule; the Proof Bundle covers the positive path through the real build.
Acceptance criteria
- The Proof Bundle builds with zero error-severity findings.
- Hand-written manifests exercising an unbound artifact, a type mismatch, an unknown Prompt slot, a malformed slot, a Repeat group whose verdict is not bound before entry, an out-of-range
reviewCheckpoint, an invalid schema asset, a platform with zero or two command invocations, and a missing or wrong-kind asset each yield a finding with a distinct stable code pointing at the offending Step or field. -
bundle build --no-install --outputon a non-composing folder exits non-zero, prints the findings, and writes nothing. - Nothing in the check executes, loads, or fetches anything.
- CI scenario: the package smoke, from the installed package on all three operating systems, asserts the Proof Bundle build reports zero error findings.
Blocked by
- Build the Proof Bundle to a
.wfbfile withbundle build --no-install --output#51 — the validated manifest, the Workflow vocabulary, and the build path the check gates.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified and ready for an AFK agentFully specified and ready for an AFK agent
Activity
.wfbfile withbundle build --no-install --output#51Sandstorm831 commentedon Sep 9, 2026
Starting context
Final blocker #51 closed at
maincommit670b323. It landed the validated manifest, the execution-free Workflow vocabulary, and the non-executingbuildpath this ticket now gates with the Composition check. The check is a new responsibility of the Workflow Module over the already-validated manifest; identity, digest, and the headlessbundle buildsurface exist and only gain findings here.reviewCheckpointinterval/message contract.$refonly within one document), the structured command invocation with per-platform overrides resolving exactly one invocation per supported platform, and asset reference kinds.670b323: workflow.ts (the vocabulary the check consults), bundle/manifest.ts (the validatedAuthoredManifestthe check runs over — Steps, Repeat groups, references, commands, inputs, assets), bundle/bundle.ts (the build path that will invoke the check and already resolves the asset tree), bundle-management.ts + build-bundle.ts (thebuildresult that carries findings), headless.ts (prints findings), projection-port.ts (theProblem/FieldViolationshape)buildpath rather than reinventing any of it.Reading rule. Read the spec for the slice's shape and the finding contract; #13 for the binding/slot/verdict rules and #9's amendments for the schema, command, and
reviewCheckpointrules; the two glossary clusters for the exact predicates the check proves and the vocabulary findings use; ADR 0021 for the non-executing invariant. Then read #51's landedworkflow.tsandbundle/manifest.tsto see the validated shape the check runs over, andbundle/bundle.ts/build-bundle.tsfor where findings join thebuildresult. The check is Workflow-owned and static regardless of how it is surfaced.Owner:Workflow Module (src/workflow/) gains the Composition check over the validated manifest and the finding type; Bundle'sbuildpath (src/bundle/) invokes it and returns findings with identity and digest; Application's Bundle-management result and the headlessbundle buildcommand carry and print them.Ratchet:a negative-case suite over hand-written manifests, one distinct stable code per composition rule; the three-OS package smoke asserts the Proof Bundle build reports zero error-severity findings.Deletes:nothing.Gate:the ADR 0027 three-OS package smoke (extended to assert zero error findings on the Proof Bundle); no new blocking job.Dependencies:none.Sandstorm831 commentedon Sep 11, 2026
Starting context — #63 update
The remaining blocker #63 closed at
maincommita7d84b8, so this ticket is fully unblocked. One delta for the Starting context above: #63 replaced the npm-tarball package smoke with a compiled-binary smoke. The seam this ticket extends (AC5 and the Gate line) is now scripts/package-smoke.mjs — it copies the Bun single-file executable into an isolated temp dir and runs it. Add the "Proof Bundle build reports zero error-severity findings" assertion there; its install-then-run isolation and the other assertions are unchanged, and it already builds the Proof Bundle with--no-install --output. Nothing else in the context above changes.feat(#52): gate bundle build on the Composition check
Sandstorm831 commentedon Sep 11, 2026
Change review
Landed at
maincommit9f5863b. CI green on the three-OS matrix.Owner / Interface. The Workflow Module gains
checkCompositionand theCompositionFindingtype (code,severity,target,explanation) over a validated manifest. Bundle'sbuildpath invokes it after shape and asset-tree validation and refuses on any error-severity finding; Application's Bundle-management and the headlessbundle buildcarry and print them. The authored-manifest vocabulary (AuthoredManifestand its constituent types,Platform/PLATFORMS,AssetKind) moved frombundle/manifest.tstoworkflow/workflow.ts— its rightful owner, and the only direction the boundary allows, since Bundle imports Workflow.manifest.tsnow validates untrusted JSON into that vocabulary.Non-executing invariant (ADR 0021). The check resolves references and bindings statically and reads no files: the build hands it the prompt and schema asset text it already decodes. The boundary suite continues to enforce that Workflow imports no Node mechanism.
Rules → stable codes. Unbound artifact, type mismatch, unknown/malformed prompt slot, repeat verdict unbound before entry, out-of-range
reviewCheckpoint(engine ceilingMAX_REVIEW_CHECKPOINT_INTERVAL = 100), invalid schema asset (UTF-8 + JSON + in-document$refonly), a supported platform not resolving exactly one command invocation, and a missing/wrong-kind asset reference (two codes). Two review additions beyond the nine:duplicate-step-id(ids are Bundle-unique per Define the self-contained Workflow Bundle contract and trust model #9 and findings key on them) andinvalid-prompt-asset(a non-UTF-8 prompt, symmetric with the schema rule).Proof Bundle. Added a
baseline-teststep before the repeat group sotest-verdictis bound before entry, per Define the minimum generic Workflow capabilities #13's canonical shape; the Proof Bundle now composes.Test evidence.
tests/workflow/composition.test.tsnegative suite (one distinct code per rule, plus the two additions), a bundle-level non-composing case, the headless refusal case (exit non-zero, findings printed, nothing written), and the existing Proof Bundle positive path. Full gate: 97 tests, build, and the compiled-binary package smoke — whose successful Proof Bundle build now stands as the zero-error-findings assertion on all three OSes (AC5).Deletes / dependencies / ADR changes. None. No new dependency; no guidance or ADR change required.
Sandstorm831 commentedon Sep 11, 2026
Complete: implemented, reviewed, committed (
9f5863b), and CI green on the three-OS matrix. Change-review recorded above; Starting context curated for the newly-unblocked #53.