Skip to content

core: an empty or half-written team file is diagnosed as "saved by a newer FlyBot; update FlyBot" #2716

Closed

Description

@Birfy

Written-by: Chief

Same audit, same sha. A state.json that parses but carries no version — {}, null, [], "" (0 bytes reads as empty), a truncated file — falls through to the sentence a genuinely newer file gets, so the person is told to update a program that is already current, and the only real recovery ("this file is empty or half written; move it aside") is never said. Fail-closed otherwise: the file is not touched and load() resolves — this is a wrong diagnosis on the very first thing a bad install can hit, not a data risk.

core/src/host/store.js:250, the fall-through of readFileState() (branches above it are version === 1 at :224 and version === STATE_VERSION at :240):

250:    stuck = 'saved by a newer FlyBot; update FlyBot'

Reproduction

cd /data/dsh/bot/workspace/audit48
### 2 empty object {}    (out/1-store-shapes.txt)
readOnly: "The Bot team file … could not be read (saved by a newer FlyBot; update FlyBot). …"
files: [ 'state.json', 'state.lock' ]        # no .broken- copy, file untouched
live : { "readOnly": "… (saved by a newer FlyBot; update FlyBot) …" }
fixed: { "readOnly": "… (the team file has no version: it is incomplete (an empty or half-written file)) …" }

Change scope

Before :250, branch on parsed?.version === undefined and answer "the team file has no version — it is incomplete (an empty or half-written file)". Keep the genuine "newer" sentence for a version above STATE_VERSION (test/store.test.js:209 already covers that). Test: {}, null, [] and a 0-byte file all get the incomplete sentence; {"version": 999} keeps the newer-FlyBot one.

Evidence: /data/dsh/bot/workspace/audit48/EVIDENCE-verify8c82.md (F3), /data/dsh/bot/workspace/audit48/out/1-store-shapes.txt, /data/dsh/bot/workspace/audit48/out/4-controls.txt.

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    on Nov 8, 2026
  2. HugoXK commented on Nov 8, 2026

    @HugoXK
    Contributor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: 10a569ae95c34888b4b7515b178f0b76
    Branch: dev/2716-core-an-empty-or-half-written-team-file
    Base: f5d2e76
    At: 2026-11-08T23:21:55Z

  3. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 9, 2026
  4. self-assigned this
    on Nov 9, 2026
  5. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 9, 2026
  6. added 2 commits that reference this issue on Nov 9, 2026
    2a08170
    4c8ec30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationScheduled tasks and automationbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions