fix(slice-05): v2 non-string workflow_specs entry rejection test (guard B1 repair on da286abd) (OPR.0.3.2.5)

Per velocity-guard BLOCKING-CONCERN on da286abd (qitem-…88a02d4b): the
v2 repair covered the non-array + unsafe-path branches of the prior
fix-recipe, but missed the non-string-entry branch that was also
explicitly named. Adds the one missing v2 test mirroring the v1
non-string-entry test pattern.

Discriminator-flip evidence BEFORE this commit (PROACTIVELY this time
per banked commitment): temporarily replaced the non-string branch of
validateWorkflowSpecsBlock with `if (typeof entry !== "string") continue;`
(silently skip non-string entries instead of pushing the "must be a
string" error). Result: 2/101 fail — v1 non-string-entry (bundle-types
.test.ts) + v2 non-string-entry (pod-bundle-assembler.test.ts). Both
depend on the validator surfacing the "must be a string" error. The 4
positive workflow_specs tests + all other branches stay green. Proves
the new v2 non-string-entry test SPECIFICALLY catches the validator's
push-and-continue behavior on non-string entries. Restored, 101/101
green.

Test-only fix; product source byte-identical to da286abd (the
discriminator-flip was perfectly restored and nothing staged for
bundle-types.ts).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
mvschwarzandClaude Opus 4.7 committed 2026-05-31 18:50:46 -07:00
1 parent da286abddd
commit 1e4b229da0
1 file changed
+12
@@ -945,6 +945,18 @@ describe("PodBundleManifest validation", () => {
expect(result.errors.some((e) => e.includes("workflow_specs must be an array"))).toBe(true);
});
it("v2: non-string workflow_specs entry rejected", () => {
const raw = {
schema_version: 2, name: "bad-workflow-specs", version: "1.0",
created_at: "2026-05-18T00:00:00Z", rig_spec: "rig.yaml",
agents: [{ name: "impl", version: "1.0", path: "agents/impl", original_ref: "local:agents/impl", hash: "abc", import_entries: [] }],
workflow_specs: [123, "workflows/ok.yaml"],
};
const result = validatePodBundleManifest(raw);
expect(result.valid).toBe(false);
expect(result.errors.some((e) => e.includes("workflow_specs[0]") && e.includes("must be a string"))).toBe(true);
});
it("v2: unsafe workflow_specs path rejected", () => {
const raw = {
schema_version: 2, name: "bad-workflow-specs", version: "1.0",