Skip to content

--write-baseline banks a record-anchor baseline from a tree that failed other record checks #1270

Description

@localai-bot

scripts/check-agent-record.py --write-baseline returned as soon as it had a
number:

        if args.write_baseline:
            return write_record_anchor_baseline(anchors)
        check_record_anchors(anchors, errors)

That return happens BEFORE the if errors: gate at the end of main, so a tree
that failed any other record check could still write
scripts/record-anchor-baseline.json. The banked figure then carries the
authority of a run that never passed, on a file whose whole purpose is to be a
number nobody may quietly raise.

Found while re-deriving the baseline for ENG-RECORD-ANCHOR-RATCHET after
merging 161 commits of main into #851. Fixed in that flow: the write moves
below the error gate, and
RecordAnchorRatchet.test_a_baseline_is_never_banked_from_a_tree_with_record_errors
holds it. The case was captured red before the change and reds again when the
early return is restored.

Row: ENG-RECORD-ANCHOR-RATCHET. Related: #632.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions