Skip to content

Phase 4 review: fail-closed release check, docs and 0.4.0 release prep - #41

Merged
pramodbn27 merged 11 commits into
mainfrom
fix/phase-4-review
Oct 19, 2026
Merged

pramodbn27 merged 11 commits into
mainfrom
fix/phase-4-review

Conversation

@pramodbn27

@pramodbn27 pramodbn27 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Follow-up review of #40 (MCP Phase 4 unified workflows), which merged without review.

What was wrong in #40

core.release_check failed open. On main it returns ready: true for:

  • an empty chaos report {}, or a failed chaos call {"ok": false, "error": ...}
  • an empty or failed comparison
  • an evaluation report with a 10% pass rate (no threshold → no check), or one that is not a valid Evals report at all
  • only one of the three kinds of evidence. This contradicts its own prompt and docs ("missing evidence is unresolved").

It also ignored every threshold except min_pass_rate, which re-implements a weaker version of the Evals release gate that MCP already wraps in lens.slo_summary. core.compare_runs was a copy of lens.compare_runs. The CHANGELOG entry was appended below 0.1.0, the docs claimed fail-closed behaviour, and the Sidecar status in docs/integrations.md was wrong.

Changes

  • Release check fails closed. Evaluation goes through the Evals gate (schema validation plus every GateConfig threshold, strict by default, unknown keys rejected). Comparisons are validated with the Lens ComparisonReport. Chaos evidence must be a chaos.run_experiment report. required_evidence defaults to all three kinds. Each gate is passed/failed/invalid/missing with reasons and observed values.
  • core.compare_runs shares the lens.compare_runs path.
  • incident_summary reports only failure signals (plus blocked gates) and returns no_signals otherwise.
  • export_report names its generator and is documented as an MCP-local envelope, not an AIOS artifact.
  • The resource is renamed to resource://workflows/release-check (unreleased, so this breaks nothing) and now has accurate steps.
  • New tests/test_unified.py (fail-closed matrix, Evals thresholds, invalid options, incidents, export, per-user hosted state).
  • New guide docs/unified-workflows.md and example examples/unified_release_check.py. README, ROADMAP, AGENTS.md, features/index/integrations/user-guide/roadmap docs, landing page and tool reference are updated, and CHANGELOG 0.4.0 is dated.

Phase 4 stays in progress: the access-containment items (authenticated stop/revoke, tool-level authorization, denial evidence) are still open.

No sibling dependency range or hosted image pin changes. Tower's deep-agentic-core-mcp>=0.3.6,<1 already admits 0.4.0.

core.compare_runs duplicated lens.compare_runs line for line. Both now run
through run_comparison, recorded under their own tool name. The adapter
also validates a comparison with the Lens ComparisonReport model and lists
the Evals GateConfig threshold names, for the unified release check.
The Phase 4 release check reported ready=true for an empty chaos report, a
failed chaos or comparison call, and a 10% evaluation pass rate, and
silently ignored every threshold except min_pass_rate.

- Evaluation evidence goes through the Evals release gate (schema
  validation plus every GateConfig threshold, strict by default) via the
  same adapter as lens.slo_summary. Unknown threshold keys are rejected.
- Comparisons are validated with the Lens ComparisonReport model; chaos
  evidence must be a chaos.run_experiment report.
- required_evidence (default: all three kinds) makes missing evidence block
  readiness, matching the prompt and docs. Gates report passed, failed,
  invalid or missing with reasons and observed values.
- incident_summary no longer reports passing evaluations or routine injected
  faults as incidents, adds blocked release gates and returns no_signals
  when nothing failed.
- export_report names its generator and is documented as MCP-local.
- Rename the unreleased resource to resource://workflows/release-check and
  describe each step, including the hosted chaos_report path.
Covers the four core tools, gate statuses, required_evidence, Evals
thresholds, the incident signals, the MCP-local export envelope and local
versus hosted use.
The Phase 4 docs claimed missing evidence was treated as unresolved while
the tool passed it, nested the new section under the Core Diagnostics
heading, and pointed the workflow diagram at chaos.export_aios_run, which
never feeds the release check. Add a README section, a user-guide
capability row and core.compare_runs on the landing page.
Sidecar 0.8.5 reports package_status implemented and runtime_ready true,
not scaffold/false; MCP still only exposes discovery.
Phase 4 stays in progress: access-containment items are open. Note that the
Tower tools ship as tower.* and that the export envelope is MCP-local.
The entry had been appended after 0.1.0 at the bottom of the file.
@pramodbn27
pramodbn27 requested a review from a team as a code owner October 19, 2026 22:49
Copilot AI lite review requested due to automatic review settings October 19, 2026 22:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T22:52:20.499835Z 421f5df PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 421f5df2dc

ℹ️ 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".

def _chaos_gate(report: dict[str, Any]) -> dict[str, Any]:
# A crashed or timed-out run is a real report with ok=false, so check its
# shape before treating ok=false as a failed call.
absent = [key for key in _CHAOS_REPORT_KEYS if key not in report]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate the complete chaos report before passing the gate

When the other required gates pass—or required_evidence is narrowed to chaos—a caller can supply {"crashed": null, "timed_out": false, "chaos_events": []} and receive ready: true. Checking only these three keys does not establish that this came from chaos.run_experiment: it omits required producer fields such as ok, id, name, and timestamps, and the values themselves are not type-validated. Validate the producer's full report shape before marking this gate passed so malformed evidence cannot make the release check fail open.

AGENTS.md reference: AGENTS.md:L48-L50

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as the Copilot chaos-shape finding; fixed in b2d4920 by validating every producer field and its type.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved moderate issues remain in input/evidence validation, stale evidence handling, and documentation accuracy.

4 open issues
What changed in this PR

Prepares the 0.4.0 Phase 4 unified workflows with fail-closed release checks, shared evidence validation, incident/export behavior, and documentation updates.

Changes:

  • Validates Lens, Evals, and Chaos evidence with explicit gate statuses.
  • Shares comparison logic and applies all configured thresholds.
  • Adds tests, examples, workflow resources, and release documentation.
File Summary
tests/​test_unified.py Adds unified workflow coverage.
tests/​test_server.py Updates server workflow tests.
tests/​test_registry.py Updates resource URI assertions.
src/​deep_agentic_core_mcp/​tools/​unified.py Implements unified gates and reporting.
src/​deep_agentic_core_mcp/​tools/​registry.py Updates tool metadata and schemas.
src/​deep_agentic_core_mcp/​tools/​lens.py Shares comparison execution logic.
src/​deep_agentic_core_mcp/​server.py Updates workflow resource content.
src/​deep_agentic_core_mcp/​resources/​catalog.py Renames the workflow resource.
src/​deep_agentic_core_mcp/​prompts/​registry.py Updates release-check guidance.
src/​deep_agentic_core_mcp/​adapters/​agenticlens.py Adds comparison and validation helpers.
ROADMAP.md Records Phase 4 progress.
README.md Documents unified workflows.
mkdocs.yml Adds workflow navigation.
index.html Updates the tool listing.
examples/​unified_release_check.py Adds an end-to-end example.
docs/​user-guide.md Updates capability documentation.
docs/​unified-workflows.md Adds the workflow guide.
docs/​tools.md Updates tool reference documentation.
docs/​roadmap.md Updates the published roadmap.
docs/​integrations.md Corrects integration statuses.
docs/​index.md Adds workflow overview content.
docs/​features.md Marks unified workflows implemented.
docs/​examples.md Documents the new example.
CHANGELOG.md Adds dated 0.4.0 release notes.
AGENTS.md Updates roadmap guidance.

Review effort: Lite

Comment thread docs/unified-workflows.md Outdated
| `core.compare_runs` | Lens baseline/candidate comparison; same behavior as `lens.compare_runs` | Stores runs and the comparison |
| `core.release_check` | Gates comparison, evaluation and chaos evidence; fails closed | Stores the result |
| `core.incident_summary` | Collects regressions, chaos crashes/timeouts, failed cases and blocked gates | Stores the result |
| `core.export_report` | Exports everything the session holds as `mcp.unified-report.v1` | Read-only |

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b2d4920: the guide now says the evidence is unchanged but the call is recorded in history. Recording the export keeps the audit trail consistent with every other tool, so I kept the behavior and corrected the docs.

Comment on lines +93 to +97
absent = [key for key in _CHAOS_REPORT_KEYS if key not in report]
if absent:
failed = _failed_call("chaos", report)
missing = f"Not a chaos.run_experiment report; missing {', '.join(absent)}"
return failed or _gate("chaos", "invalid", [missing])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b2d4920: the chaos gate now requires every chaos.run_experiment field (ok, id, name, start_time, end_time, chaos_events, crashed, timed_out) with the expected type, and returns invalid otherwise. Tests cover the three-key lookalike, a string chaos_events and a string timed_out.

"evaluation": arguments.get("evaluation_report"),
"chaos": arguments.get("chaos_report", state.last_chaos_report),
}
return {kind: value if isinstance(value, dict) else None for kind, value in supplied.items()}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b2d4920: supplied non-object evidence is now gated as invalid instead of missing (tests for chaos_report: [] and comparison: []).

- A chaos report must carry every chaos.run_experiment field with the right
  type (ok, id, name, timestamps, chaos_events list, crashed, timed_out);
  a three-key lookalike is invalid, not passing.
- Falsy non-object thresholds ([], "", null) are rejected instead of
  silently falling back to the default gate.
- Supplied non-object evidence is gated as invalid rather than reported as
  missing.
- Document that core.export_report leaves evidence unchanged but records
  the call in history.
@pramodbn27
pramodbn27 merged commit cea1cd9 into main Oct 19, 2026
6 checks passed
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.

2 participants