Skip to content

Forge concept contracts have no conformance tests tying them to actual script output #26

Description

@pseudoseed

The TypeScript contracts in lib/forge-contracts.ts describe the JSON each forge concept returns. Nothing verifies that any script actually produces that shape.

So a script can drift from its contract and everything stays green: the TS side compiles against a type nobody checks, and the shell side prints whatever it prints.

Raised by the #13 builder while adding the Ci* contracts. It noted the gap rather than fixing it, correctly, because fixing it only for the CI concepts would be worse than the current state — it would imply the other 18 are covered when they are not.

Scope

All forge concepts, all providers, not just the CI ones. Today that is 22 concepts across github, gitea, gitlab, linear.

Shape

A conformance test per (concept, provider) that runs the real script against a captured fixture and asserts the output parses into its declared contract. Fixtures over live calls, so it runs in CI and offline.

Where a provider disables a concept, the test should assert the disabled envelope rather than skipping — a disabled concept and an untested one should not look the same in the suite. That distinction is the whole point.

Why it matters

Two real defects this week came from output shape rather than logic:

Neither is caught by a type. Both are caught by running the script and checking the result.

Note

This is groundwork, not a fix. It is worth doing before the next provider is added, because each new provider multiplies the untested surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreCore libraries and shared logicenhancementNew feature or requestfork-onlyDeliberately not upstreamed to cluesmith/codev

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions