## TL;DR
B2 lifecycle rules hide or keep versions according to their settings, and a file can vanish from listings while its versions still exist: the agent reported deletions that the rules never made. Read the bucket's lifecycle rules and the file's version listing directly, distinguish hidden from deleted states, and rebuild the report on version-aware queries before telling anyone their backups are gone.

```text
agent read Backblaze B2 lifecycle rules wrong and reported versioned backups as deleted
```

## Use this when
- The job or restore fails with this symptom: agent read Backblaze B2 lifecycle rules wrong and reported versioned backups as deleted.
- You are working on an agent reporting Backblaze B2 stored backup versions and the failure repeats on the same target or schedule.
- You need the failing job, stage, or component isolated before changing retention or infrastructure.

## Not for this skill when
- Versions genuinely deleted by a lifecycle rule set to expire them, where the fix is the rule's design, and the report should say the rule did it.
- The error text names a different product, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. List the file's versions through the version-aware API and compare with the simple listing the agent used. Verify: the versions' real states are visible
2. Read the bucket's lifecycle rules and map each rule's action to the states observed. Verify: the hiding behaviour is explained by the rules
3. Identify any versions truly deleted and attribute them to the rule or event that deleted them. Verify: real deletions are separated from hidden ones
4. Correct the report and add the version-aware listing as the audit's standard method. Verify: the report reflects version reality

## Variant phrasings
### agent read b2 lifecycle rules wrong reported versions deleted
The verbatim phrasing.
### backblaze b2 versions hidden not deleted agent lifecycle fix
The hidden phrasing.
### agent backup report b2 versions missing version aware listing
The listing phrasing.

Compatibility: Agent interpretation of Backblaze B2 lifecycle rules and versioning

## Why it happens
B2's versioning model has states a plain file listing cannot express, and lifecycle rules act on those states on their own schedule. An agent reading only the simple listing sees an edited reality and reports deletions that are really the storage working exactly as configured.

## Edge cases / pitfalls
- Hide-versus-delete mistakes also run in reverse: versions believed kept under a rule can be expiring on schedule.
- Lifecycle changes take time to act across a bucket; a report should note the rule's effective window.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_vxf862s9JhqvsZe6mmh-Eg
