Skip to content

Refuse or consume the calibration configuration block #29

Closed

Description

@datacas

Problem / Background

This repository's own .code-cycle.yml declares a code_cycle.calibration.profiles block, with two candidate reviewers and a comment describing a comparison "that has not run yet". No code reads that block.

run_cycle._load_config (scripts/run_cycle.py:150-161) shape-checks exactly three paths — code_cycle, code_cycle.repository, code_cycle.profiles — and every other key under code_cycle passes through unexamined. router.load_profiles() reads only code_cycle.profiles. Calibration itself is reachable only through run_cycle.py --mode calibration (scripts/run_cycle.py:603).

Two consequences, one good and one not:

The safety property already holds, and no new flag is needed. Accidental experimentation is structurally impossible today: a production cycle has no exploration code to run, calibration requires an explicit command-line mode, RoutingMode.CALIBRATION refuses to substitute an arm (router.py:340, router.py:371-373), and a calibration dispatch demands PROVEN readiness (executors.py:966-975). Adding calibration: enabled: false would be ornamental YAML that restates a guarantee the entry point already gives. This issue deliberately does not propose it — it proposes writing the reason down instead.

The configuration lies about what it does. A user who declares calibration candidates, or who typos code_cycle.profles, gets silence and a run under a policy they did not declare. That contradicts the project's own rule that invalid configuration fails before a run is spent, and the rule that configuration must not silently disable the thing it configures — the failure GateRule.from_config (scripts/security_gate.py:119-135) and _known_models() both name explicitly.

Note the same silence covers code_cycle.review and code_cycle.security_review, which are consumed — by the review skills and by security_gate.py — but not by run_cycle, so a typo in either is equally invisible at load time.

Desired behavior

  • The configuration loader knows which keys under code_cycle are legitimate and reports an unknown one by name, before anything is dispatched.
  • code_cycle.calibration stops being ignored: either it resolves the arms of an explicitly launched calibration, or it is refused as not-yet-supported. Both are acceptable; silence is not.
  • The "no accidental experimentation" guarantee is stated in the documentation together with the reason it holds — the explicit --mode calibration entry point — so the absence of an enabled flag is a recorded decision rather than an omission.

Non-goals

  • Adding calibration.enabled. See above.
  • Changing how calibration is launched.
  • Weakening the rule that a calibration never falls back between arms.
  • Merging calibration samples with production samples, or changing how the two are distinguished.
  • Making run_cycle a consumer of keys that belong to the skills.

Acceptance criteria

  • An unknown key under code_cycle is reported by name at load time, before a run is spent.
  • code_cycle.calibration is either consumed or explicitly refused, and which one is documented.
  • This repository's existing .code-cycle.yml still loads without error after the change.
  • Keys consumed by skills rather than by run_cycle are recognised as legitimate, not rejected as unknown.
  • Production still cannot enter calibration without the explicit mode; this is asserted by a test, not assumed.

Expected tests

  • An unknown key under code_cycle raises, and the message names the key.
  • A typo of a known key — e.g. profles — raises rather than silently routing on defaults.
  • The repository's own configuration file loads.
  • A production run with a calibration block present never enters RoutingMode.CALIBRATION.
  • The existing no-silent-fallback and PROVEN-readiness calibration tests still pass.

Dependencies

Best landed after the routing.strategy contract, so that routing is already a recognised key when the allow-list of known keys is introduced.

Activity

  1. datacas commented on Sep 22, 2026

    @datacas
    OwnerAuthor

    Tracked in #31 — Configurable and measured routing roadmap, which records the dependency order and the invariants this work must not break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions