Skip to content

Commit e8e0164

Browse files
cursoragentravidsrk
andcommitted
fix(registry-lint): drop duplicate exploratory-on-disk check
Route the CLI through lint_registry() so ARCH-004's on-disk exploratory check runs once (matching the library aggregator) and cannot drift. Co-authored-by: Ravindra Kumar <ravidsrk@gmail.com>
1 parent 59b5626 commit e8e0164

4 files changed

Lines changed: 23 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ surface, an instruction-budget diet, and a pruned mission catalog.
6565
single-agent-first critique, documents `fleet-verify`, and fixes the dead Orca link
6666
(`diggerhq/orca``stablyai/orca`).
6767
- Architecture/menu counts, plugin description, and guide/docs-site catalog updated to
68-
12 exploratory + 6 archived; test suite now 73 files / 1585 tests.
68+
12 exploratory + 6 archived; test suite now 73 files / 1586 tests.
6969

7070
### Removed
7171

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Individual validators:
391391
./scripts/validate-fleet-outcome.sh # readiness doc fleet-outcome YAML
392392
./scripts/validate-goal-condition.sh --scan-docs # /goal binding
393393
python scripts/validate_run_archive.py # Layers 3 & 4: manifest + sha256 + mtime ordering (the blind-fix anti-anchoring ordering IS Layer 3)
394-
pytest tests/ # full suite (73 files, 1585 tests; 100% line coverage of the Python tooling, scripts/*.py — shell is validated by behavioral + mutation tests, not line coverage)
394+
pytest tests/ # full suite (73 files, 1586 tests; 100% line coverage of the Python tooling, scripts/*.py — shell is validated by behavioral + mutation tests, not line coverage)
395395

396396
# Operator gates (run on a specific run-id)
397397
python scripts/verify_findings.py \
@@ -497,7 +497,7 @@ autonomous-fleet/
497497
│ ├── lib/ # fleet_outcome, fleet_run, verify_findings, verify_blind_fix, emit_trace, analyze_seat, analyze_cost, locks, substrate_disable, stop_verify, mission_registry, venv-bootstrap
498498
│ └── install-skills.sh
499499
├── action.yml # GitHub Action: fleet-verify as a PR-side gate
500-
├── tests/ # 73 test files, 1585 tests; validators + engine doctrine + 4-layer substrate
500+
├── tests/ # 73 test files, 1586 tests; validators + engine doctrine + 4-layer substrate
501501
├── .agents/skills/ # installed skill copies (gitignored)
502502
└── skills-lock.json # lockfile for npx skills
503503
```

scripts/registry_lint.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,9 @@ def main() -> int:
2929
return 1
3030
return announce_disabled("registry-lint", "FLEET_DISABLE_REGISTRY_LINT")
3131
root = Path(sys.argv[1]) if len(sys.argv) > 1 else Path(".")
32-
errors = (
33-
rl.lint_shipped_mission_dirs(root)
34-
+ rl.lint_catalog_mentions(root)
35-
+ rl.lint_skills_lock(root)
36-
+ rl.lint_lock_hashes(root)
37-
+ rl.lint_no_skill_version_literals_in_tests(root)
38-
+ rl.lint_mission_state_docs(root)
39-
+ rl.lint_adapter_contract_single_source(root)
40-
+ rl.lint_external_source_pins(root)
41-
+ rl.lint_campaign_missions(root)
42-
+ rl.lint_exploratory_on_disk_registered(root)
43-
+ rl.lint_exploratory_on_disk_registered(root)
44-
)
32+
# Delegate to the library aggregator so CLI and lint_registry() never drift
33+
# (ARCH-004: exploratory-on-disk check must appear exactly once).
34+
errors = rl.lint_registry(root)
4535
for e in errors:
4636
print(f"registry-lint: {e}", file=sys.stderr)
4737
return 1 if errors else 0

tests/test_registry_lint_cli.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,20 @@ def test_exploratory_on_disk_registered_flags_orphan_and_skips_archive(tmp_path:
255255
def test_exploratory_on_disk_registered_empty_when_base_missing(tmp_path: Path):
256256
assert rl.lint_exploratory_on_disk_registered(tmp_path, missions={}) == []
257257

258+
259+
def test_cli_does_not_duplicate_exploratory_on_disk_errors(tmp_path: Path):
260+
"""Greptile #148: CLI must call lint_exploratory_on_disk_registered once.
261+
262+
An unregistered exploratory mission should emit exactly one registry-lint
263+
line for that slug — not a duplicated pair from a double append.
264+
"""
265+
base = tmp_path / "docs" / "exploratory" / "missions" / "orphan-mission"
266+
base.mkdir(parents=True)
267+
(base / "SKILL.md").write_text("# orphan\n", encoding="utf-8")
268+
# Minimal skills/ so other lints don't drown the assertion; empty root still
269+
# produces many shipped-dir errors, so filter to the exploratory message.
270+
rc, _out, err = _run_cli(str(tmp_path))
271+
assert rc == 1
272+
hits = [line for line in err.splitlines() if "orphan-mission" in line]
273+
assert len(hits) == 1, f"expected one orphan-mission error, got {hits!r}"
274+

0 commit comments

Comments
 (0)