Skip to content

Enforce current Talos snapshot contract - #16

Merged
Pro777 merged 1 commit into
developfrom
agent/talos-current-reality-enforcement
Jul 20, 2026
Merged

Enforce current Talos snapshot contract#16
Pro777 merged 1 commit into
developfrom
agent/talos-current-reality-enforcement

Conversation

@Pro777

@Pro777 Pro777 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject deprecated enforcement surfaces at Talos snapshot ingestion, including Weekend Mode, Redis queue-v2 variants, Perpetua, and Campion
  • require BLD project metadata to classify as operations/ops or inference, rejecting stale behavioral/agent/bootstrap classifications
  • surface invalid snapshot contracts as clean CLI input errors for evaluate/explain instead of tracebacks

Why

Talos enforcement should reflect the current operating reality mechanically at the runtime input boundary, rather than relying on deprecated behavioral guidance or stale upstream component assumptions.

Validation

  • . .venv/bin/activate && pytest --cov=talos --cov-report=term-missing --cov-report=xml -> 49 passed, 100% coverage
  • git diff --check
  • installed CLI smoke: accepted BLD operations snapshot persisted cycles/status/history and deprecated WeekendMode snapshot failed with snapshot is not valid Talos input

Summary by CodeRabbit

  • Bug Fixes

    • Improved evaluate and explain error handling for invalid or malformed snapshot JSON.
    • Snapshot validation now rejects deprecated source terms and project references.
    • Added validation for project structure and BLD lane classifications.
    • Error messages now clearly identify snapshots that are not valid Talos input.
  • Tests

    • Added coverage for invalid snapshots, deprecated values, and BLD lane validation.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c173867-dc0d-41d1-a03d-f1b8f248b86b

📥 Commits

Reviewing files that changed from the base of the PR and between 89110b9 and efc2991.

📒 Files selected for processing (4)
  • talos/cli.py
  • talos/models.py
  • tests/test_cli.py
  • tests/test_models.py

Walkthrough

Snapshot parsing now validates deprecated enforcement terms, project structures, and BLD lane classifications. The evaluate and explain commands convert snapshot parsing failures into CLI parser errors, with tests covering the new validation and error paths.

Changes

Snapshot validation and CLI error handling

Layer / File(s) Summary
Snapshot parsing contracts
talos/models.py, tests/test_models.py
Snapshot parsing normalizes and validates source, rejects deprecated project references, enforces project structure, and validates BLD lane values.
CLI snapshot error handling
talos/cli.py, tests/test_cli.py
evaluate and explain catch snapshot parsing exceptions and report invalid input through parser.error(...).

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • Spitfire-Cowboy/talos#13: Introduced foundational TalosSnapshot and runtime evaluation-contract work extended by this validation.
  • Spitfire-Cowboy/talos#14: Introduced the evaluate and explain CLI commands and their existing test coverage.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/talos-current-reality-enforcement

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.

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Pro777
Pro777 marked this pull request as ready for review July 20, 2026 14:41
@Pro777
Pro777 merged commit a98fa32 into develop Jul 20, 2026
10 of 11 checks passed
@Pro777
Pro777 deleted the agent/talos-current-reality-enforcement branch July 20, 2026 14:41
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.

1 participant