Skip to content

porch: .codev/config.json command override is silently ignored for forge-intercepted checks (pr_exists) #1282

Description

@waleedkadous

Problem

A porch.checks.<name>.command override in .codev/config.json is silently discarded when the check is one porch routes through the forge concept dispatcher. Found live during project 1252's close-out:

  • packages/codev/src/commands/porch/checks.ts:262 intercepts pr_exists and dispatches to the forge script unconditionally — after the config-override merge, discarding any overridden command. Porch even prints ⚠ Check pr_exists overridden: ... and then ignores the override.
  • Only cwd and skip survive for intercepted checks (skip works because protocol.ts:304 omits the check before the interception fires).

Why it mattered

The forge pr-exists script keys off the current branch and deliberately excludes closed PRs (#653). Project 1252's PR moved to a different branch (harvest PR #1281 replacing closed #1278), making the branch-keyed check unsatisfiable — and the sanctioned Spec #550 escape hatch (a targeted command override) turned out to be a no-op. The workaround was {"skip": true}, which is blunter than anyone wanted.

Fix directions (builder's judgment welcome)

Either honor the command override (config > forge interception — matching the documented 'config beats protocol' precedence), or reject it loudly at load time ('command overrides are not supported for forge-intercepted checks: pr_exists') instead of warning-then-ignoring. Silent discard is the one wrong behavior.

Credit: diagnosed by builder spir-1252 during gate close-out (evidence at checks.ts:262, protocol.ts:304); noted in its completion report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/porchArea: Porch state machine / protocol orchestration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions