Skip to content

bug: formula_v2 disabled silently downgrades v2+ formulas to v1 instead of failing #717

@rileywhite

Description

@rileywhite

Before you continue

  • I searched existing issues and did not find a duplicate.
  • I read the relevant docs and contributor guidance.

Gas City version

0.14.1

Environment

Linux x86_64, Ubuntu 24.04 (kernel 6.18.7)

Reproduction

  1. Start gascity with formula_v2: false in the daemon config (the default setting).
  2. Create or use a formula that declares version: 8 (or any version ≥ 2).
  3. Dispatch a session against that formula.
  4. Observe daemon log output: formula declares version N but formula_v2 is disabled; compiling as v1
  5. Session runs to completion using v1 linear execution — no graph semantics, no DC/RC, no scribe co-authored commits.

Expected behavior

When a formula declares version >= 2 and FormulaV2Enabled is false, the compiler should refuse to compile and return an error. Operators get a loud failure they can investigate and act on, rather than a silent downgrade.

Actual behavior

internal/formula/compile.go:406-420 (isGraphWorkflow): when !FormulaV2Enabled, the version mismatch is logged at Printf level and the function returns false, silently dropping the formula into the v1 compilation path. The dispatched session runs as a v1 formula — linearly, without any of the graph semantics (ralph loops, design council, review council) that version: 8 declares.

Concrete example: a polecat dispatched against a version: 8 formula completed in ~11 minutes without a design council, review council, or scribe co-authored commits. The bead closed successfully, but the workflow contract was silently violated — nothing in the session output indicated v1 fallback had occurred.

Logs, screenshots, or traces

formula declares version 8 but formula_v2 is disabled; compiling as v1

This is emitted at Printf level to the daemon log. It does not surface in session output or the dispatched agent's context, so the operator has no indication the formula ran under a degraded mode.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugBroken behaviorpriority/p2Medium — real problem, workaround exists

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions