Repository navigation
Report stale proposals on read (S-001) - #105
Merged
Merged
Conversation
An open proposal is stale when a host its basis names has a later observedAt in the basis folder than the basis records. decisions list, decisions show and why add stale and staleHosts to proposed decisions only; --stale filters list and why; approve names the stale hosts and their newer times in its prompt and still runs. Nothing is stored: the record and its schema stay as they were. An observation file that is not valid JSON stops the command with RECORD_INVALID. Builds spec S-001. Fixes #97 Fixes #26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds spec S-001 (
docs/specs/001-stale-proposals.md): an open proposal is stale when a host named in itsbasis.observedAthas a laterspec.observedAtin its observation file in the folderbasis.observationsnames. Worked out on read, never stored; no status value, no schema change.ObservationClockandStalenessinsdk/src/cloudfall/decision.py: a relative basis folder resolves against the repository (asproposewrites it), each folder is read once per command, and times compare as datetimes (a naive time is UTC)decisions list,decisions showandcloudfall whyaddstale(andstaleHostswhen true) besideapiVersion/specin eachproposeddecision document; every other status carries neither key. Inwhythe keys sit inanswers[].decision, the same place as indecisions list--staleondecisions listandwhykeeps only the stale proposals and combines with--status; the MCP tools generated from both get the flagdecisions approveon a stale proposal prefixes its attestation prompt with each stale host, its newerobservedAtand the time the proposal saw, then runs as beforeRECORD_INVALID, context codedecision_observation_invalid, naming the filebuilt, with its Issues and Verification sections filledTest plan
sdk/tests/test_stale.py, one or more tests per criterion S-001-1 to S-001-9 (specs.py coverage --spec 001lists them all), including a byte and mtime compare of the record (S-001-7) and a realansible-playbookapprove at a simulated terminal (S-001-8)decisions list(plus--stale,--stale --status proposed),decisions show,why,why --stale, agit hash-objectbefore/after compare, and a broken observation file giving exit 86RECORD_INVALIDuv run ruff check .,uv run mypy,uv run pytest(538 passed),uv run cloudfall config validate --project config/examples,specs.py check,specs.py coverage --spec 001: all greenFixes #97
Fixes #26
🤖 Generated with Claude Code