Skip to content

feat(devtools): lab list subcommands and artifact-graph --strict - #454

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/lab-list-exit-codes
Apr 26, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/lab-list-exit-codes

Conversation

@Sinity

@Sinity Sinity commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #446. Adds devtools lab-scenario list, devtools lab-corpus list, and devtools artifact-graph --strict. Closes the discoverability gap surfaced by the lab-claims audit.

Problem

The verification-lab surface had two specific gaps per the lab-claims audit (swarm 2026-04-26):

  • Missing list subcommands: devtools lab-scenario list and devtools lab-corpus list are documented/expected patterns but didn't exist; users discovering scenarios failed with exit 2.
  • Silent partial failures: devtools artifact-graph always exited 0 even when its own output reported uncovered_artifacts, uncovered_operations, uncovered_maintenance_targets. CI saw exit 0 and treated the lab as passed.

Solution

devtools lab-scenario list

Lists available scenario sets with their tier-0 exercise count and committed-baseline count. --json for tooling.

$ devtools lab-scenario list
archive-smoke         tier-0 exercises: 50
  baselines: 50 (tests/baselines/showcase)

devtools lab-corpus list

Lists corpus source kinds (default, inferred).

$ devtools lab-corpus list
  default (default)
  inferred

devtools artifact-graph --strict

Default behavior unchanged (exit 0). --strict returns exit 1 when uncovered artifacts, operations, or maintenance targets exist. Currently fails because the realized tree has 5 uncovered maintenance targets.

Verification

$ devtools verify --quick
verify: all checks passed (incl. all 8 lints)

$ pytest tests/unit/devtools/test_lab_list_subcommands.py -v
5 passed

$ devtools lab-scenario list --json
{ "scenarios": [{ "name": "archive-smoke", ... }] }

$ devtools lab-corpus list --json
{ "corpus_sources": [{ "name": "default", "is_default": true }, ...] }

$ devtools artifact-graph --strict; echo "exit=$?"
exit=1   # uncovered maintenance targets surface

The companion sub-issue ("validate output before returning success" for lab-corpus generate) is deferred — verification of generated files requires inspecting parser output and is more naturally a follow-up issue.

Related

🤖 Generated with Claude Code

Closes #446.

- Add `devtools lab-scenario list` with --json. Lists available scenario
  sets with their tier-0 exercise count and committed-baseline count.
- Add `devtools lab-corpus list` with --json. Lists corpus source kinds
  available to `generate` and `seed`.
- Add `devtools artifact-graph --strict`. Default behavior unchanged
  (always exit 0); `--strict` exits 1 when uncovered artifacts,
  operations, or maintenance targets are reported.

Closes the discoverability gap surfaced by the lab-claims audit
(.agent/scratch/swarm-2026-04-26/lab-claims-audit.md): users discovering
lab capabilities used to fail with exit 2 on the missing list verbs.

Tests in tests/unit/devtools/test_lab_list_subcommands.py:
- list output (human + json) for both lab commands
- artifact-graph --strict fails today on uncovered maintenance targets
  (will flip when those are covered)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 47 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 47 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 61817197-c0fc-4097-85a1-c816690f0782

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb0c25 and 14c0229.

📒 Files selected for processing (5)
  • devtools/artifact_graph.py
  • devtools/command_catalog.py
  • devtools/lab_corpus.py
  • devtools/lab_scenario.py
  • tests/unit/devtools/test_lab_list_subcommands.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/lab-list-exit-codes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 2f8cd57 into master Apr 26, 2026
13 checks passed
@Sinity
Sinity deleted the feature/fix/lab-list-exit-codes branch April 26, 2026 12:20
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:54
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Closes #446. Adds `devtools lab-scenario list`, `devtools lab-corpus
list`, and `devtools artifact-graph --strict`. Closes the
discoverability gap surfaced by the lab-claims audit.

## Problem

The verification-lab surface had two specific gaps per the lab-claims
audit (swarm 2026-04-26):

- **Missing list subcommands**: `devtools lab-scenario list` and
`devtools lab-corpus list` are documented/expected patterns but didn't
exist; users discovering scenarios failed with exit 2.
- **Silent partial failures**: `devtools artifact-graph` always exited 0
even when its own output reported `uncovered_artifacts`,
`uncovered_operations`, `uncovered_maintenance_targets`. CI saw exit 0
and treated the lab as passed.

## Solution

### `devtools lab-scenario list`

Lists available scenario sets with their tier-0 exercise count and
committed-baseline count. `--json` for tooling.

```
$ devtools lab-scenario list
archive-smoke         tier-0 exercises: 50
  baselines: 50 (tests/baselines/showcase)
```

### `devtools lab-corpus list`

Lists corpus source kinds (`default`, `inferred`).

```
$ devtools lab-corpus list
  default (default)
  inferred
```

### `devtools artifact-graph --strict`

Default behavior unchanged (exit 0). `--strict` returns exit 1 when
uncovered artifacts, operations, or maintenance targets exist. Currently
fails because the realized tree has 5 uncovered maintenance targets.

## Verification

```
$ devtools verify --quick
verify: all checks passed (incl. all 8 lints)

$ pytest tests/unit/devtools/test_lab_list_subcommands.py -v
5 passed

$ devtools lab-scenario list --json
{ "scenarios": [{ "name": "archive-smoke", ... }] }

$ devtools lab-corpus list --json
{ "corpus_sources": [{ "name": "default", "is_default": true }, ...] }

$ devtools artifact-graph --strict; echo "exit=$?"
exit=1   # uncovered maintenance targets surface
```

The companion sub-issue ("validate output before returning success" for
`lab-corpus generate`) is deferred — verification of generated files
requires inspecting parser output and is more naturally a follow-up
issue.

## Related

- #401 — post-renewal consolidation umbrella.
- #410 — scenarios as docs/media/proof catalog (depends on `lab-scenario
list`).
- #411 — representative provider corpora (depends on `lab-corpus list`).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(devtools): add missing list subcommands and tighten exit codes

1 participant