BOHICA-LABS / BOHICA-LABS/vsdd-factory

bug(factory-health): output should distinguish "verified intact" vs "just bootstrapped from empty" — current state is misleading

Open
#236 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
Avg merge
6h 43m
Merged PRs (30d)
29

Description

## Summary

`/vsdd-factory:factory-health` creates everything that's missing (orphan branch, worktree, STATE.md, 13 directories) and then reports `Factory Health: ✓ HEALTHY` or `Factory Health: REPAIRED`. There is no semantic separation between:

1. **"I verified that an existing factory state is intact and matches what I expect."** (true health check)
2. **"I just bootstrapped a brand-new factory state from nothing because nothing was there."** (initialization disguised as health)

For operators, this matters a lot:
- Case 1: factory has been running here, state is preserved, ready to continue.
- Case 2: anything that was previously in `.factory/` is GONE; we just made a new orphan branch.

The skill output is essentially the same. On switchboard-blue (2026-06-23) my run was case 2, but the final report said "REPAIRED → HEALTHY" — which could be read as "we fixed something minor and you're good," when in fact every artifact was just freshly created.

## Proposed

Distinguish three outcomes in the report:

- `Factory Health: ✓ HEALTHY` — verified existing artifacts match the schema; no writes performed.
- `Factory Health: REPAIRED` — minor issues found and fixed; existing meaningful state preserved (e.g., remounted a worktree but the orphan branch existed, STATE.md was present, etc.).
- `Factory Health: INITIALIZED` — nothing was there; the skill bootstrapped a fresh factory. Operator should understand that any prior factory state is gone (or, more precisely, was never present in this session's worktree).

Add a "What was created vs verified" section:

```
Factory Health: INITIALIZED (fresh bootstrap — no prior state found)

Created (new):
- factory-artifacts orphan branch
- .factory/ worktree mount
- .factory/STATE.md
- 13 .gitkeep directories

Preserved (already present):
(none)

Verified (matched schema):
(none — fresh bootstrap)
```

vs

```
Factory Health: ✓ HEALTHY (existing state verified)

Verified:
- factory-artifacts orphan branch (98 commits, last 2 hours ago)
- .factory/ worktree on factory-artifacts (HEAD: abc123)
- .factory/STATE.md (phase: 3.1, last modified 2 hours ago)
- 13 directories present with content

Created: (none)
```

## Acceptance criteria

- [ ] Factory-health output distinguishes HEALTHY / REPAIRED / INITIALIZED with clear semantics.
- [ ] INITIALIZED state explicitly tells the operator no prior factory state was found.
- [ ] Operators can never mistake "factory just got bootstrapped" for "everything's fine, continuing where we left off."

## Found during

`/vsdd-factory:factory-health` on `switchboard-blue` (2026-06-23, vsdd-factory@1.0.0-rc.21). The skill bootstrapped everything from nothing (no prior factory state existed) but reported "REPAIRED → HEALTHY (with uncommitted artifacts pending)." A casual reader would assume the skill verified something rather than creating everything.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.