feat(guardian): implement specification-driven review - #624
Merged
Conversation
Add evidence-backed local-specification exploration, aggregation, memory, patch checking, and cross-cycle delivery. Preserve runtime probes and cumulative solver accounting, and cover the revised DeepSWE workflow with focused tests.
Bind one-specification probes to authoritative trajectory commands, derive outcomes from exit codes, persist stable probe identity across commits, and reject ambiguous evidence. Preserve compatibility with existing Guardian memory and cover marker recovery, inconclusive runs, duplicate rejection, and supersession.
Allow one read-only, non-executing repair of malformed probe references while deriving outcomes from the original command trajectory. Preserve valid probes when sibling evidence is malformed and expose deterministic probe acceptance and rejection metrics in artifacts.\n\nVerified with 81 focused Guardian and DeepSWE tests plus Black, isort, flake8, and git diff checks.
Resolve specification identity by normalized statement and condition before accepting aggregator-selected IDs. Prevent an incoming record from rewriting an existing specification and preserve equal statements under distinct conditions.\n\nThis ports the reviewed PR #532 memory invariant to the newer structured specification-memory architecture. Verified with 83 focused Guardian and DeepSWE tests plus Black, isort, flake8, and git diff checks.
Materialize verbatim task context cited by the aggregator into the host-owned evidence ledger and canonicalize the patch-checker alias form. This prevents explicit requirements from being rejected merely because an explorer did not duplicate the task citation.\n\nVerified with 85 focused Guardian and DeepSWE tests plus Black, isort, flake8, and git diff checks.
Read completed review responses directly by requested commit so solver relaunch does not race the latest-report projection. Ignore terminal responses that did not perform a review.\n\nVerified with 88 focused Guardian harness and client tests.
Make the host controller the sole writer of the durable reviewed-commit head and recover it only when a matching completed episode proves the review. Preserve the prior head across failed, superseded, and cycle-limit responses.\n\nVerified with 89 focused Guardian harness and client tests.
Require lifecycle probes to separate the configured output directory from the invocation working directory, validate every contract-named artifact, and resolve metadata references within the same artifact set. This exposes current-working-directory fallbacks like the IGEL two-cycle failure.\n\nVerified with 89 focused Guardian harness and client tests.
Add retryable structured discovery, experimental explorer-contribution artifacts, bounded contract-driven probes, authoritative executed verdicts, and safer report-delivery synchronization. Preserve candidate-scoped identities and cumulative solver accounting across review cycles.\n\nVerified with 125 focused Guardian and DeepSWE tests plus Black, isort, flake8, and git diff --check.
Keep review artifacts outside the repository, enforce explorer and model-output limits before contribution analysis, and accept only canonical commit-addressed exchange filenames. Verified with 133 focused tests, the unit tier (5430 passed), and the changed-file pre-commit hooks.
fishmingyu
force-pushed
the
feat/guardian-specification-review
branch
from
August 15, 2026 22:26
10d3d60 to
d12c239
Compare
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
Rework Repository Guardian around evidence-backed local-specification discovery and contract-driven patch review. The implementation uses independent cheap-model explorers, strong-model aggregation, persistent cross-cycle specification memory, targeted runtime probes, and commit-addressed delivery back to the coding agent.
Changes
Type of Change
Testing
Tests pass locally
Added new tests for the changes
pytest -q test/clients/test_execution.py test/clients/test_guardian.py test/clients/test_guardian_exchange.py test/clients/test_guardian_memory.py test/guardian/deepswe --tb=short— 133 passed.Unit tier — 5430 passed, 71 skipped, 191 deselected. The isolated worktree omitted one local distribution-metadata assertion because its host installation was still 0.2.0; the same assertion passes in the current main worktree with 0.2.1 metadata.
Changed-file pre-commit hooks and
git diff --checkpassed.Earlier real DeepSWE smoke:
igel-persist-feature-schema, Terra solver/aggregator, five Luna explorers, one Guardian cycle — reward 1.0, F2P 24/24, P2P 2/2, Guardian complete and not degraded.Checklist