Skip to content

Baseline-match verify gate is dead code for generic bmad-dev-auto sessions (baseline_commit vs baseline_revision) #89

Description

@pbean

Context

Found by the PR #86 final review (adversarially verified). Pre-existing on main; masked by test fixtures.

The gap

_verify_shared_gates reads fm.get("baseline_commit", "") from the spec frontmatter and skips the whole baseline-match check when the key is absent (verify.py ~1055-1061). The generic bmad-dev-auto skill never writes baseline_commit — its step-03 stamps baseline_revision ('Capture baseline_revision (current HEAD…) into {spec_file} frontmatter'). The only baseline_revision → baseline_commit translation lives in devcontract's result-synthesis, which the gate does not consult (it re-reads frontmatter directly).

Net: in production the baseline-match gate never fires for generic-skill sessions — a spec claiming a stale/foreign baseline sails through.

Why the tests didn't catch it

tests/conftest.py's write_spec (and the engine-test session fakes) emit baseline_commit: directly, fabricating exactly the key the real skill never writes — so the gate looks alive and matching under test.

Fix shape

  • Gate reads both keys (baseline_commit, falling back to baseline_revision) or a single normalizing reader.
  • Make the fixtures honest: write_spec should stamp baseline_revision like the real skill, so a regression here fails a test.
  • Note the interaction with feat(resolve): intent-gap patch-restore re-drive + inline-review-layer preflight (re-cut) #86's patch-restore path: re-arm now re-stamps baseline_revision (review F2), so once the gate reads it, restore re-drives stay consistent by construction.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions