Merged
Conversation
added 14 commits
April 16, 2026 18:42
…ithout dumping tracebacks
…st for real-time status accuracy
…stages in sequence
…riance in logger module prefixes
There was a problem hiding this comment.
Pull request overview
Refactors CLI logging/stats output and improves run interruption persistence, aiming to make telemetry/metrics and state reporting more robust during CLI usage and forced shutdowns.
Changes:
- Updates CLI log formatting to use Rich markup and consistent short-name prefixes.
- Expands CLI commands to load
.env(when available) and improves pipeline-load error handling instatus. - Persists run/manifest state on forced shutdown (second Ctrl+C) and enhances
statusstage stats rendering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/deepzero/engine/runner.py |
Tracks active run/sample state and attempts to persist state during forced shutdown. |
src/deepzero/cli.py |
Reworks logging formatter/handler setup, adds env loading for more commands, and adjusts status stats rendering. |
README.md |
Restructures Quickstart steps and removes the dedicated Installation section. |
.env.example |
Adds Vertex AI-related environment variable placeholders. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+47
to
+64
| msg = super().format(record) | ||
| from rich.markup import escape | ||
|
|
||
| msg_escaped = escape(msg) | ||
|
|
||
| colors = [ | ||
| "cyan", | ||
| "magenta", | ||
| "green", | ||
| "yellow", | ||
| "bright_cyan", | ||
| "bright_magenta", | ||
| "bright_green", | ||
| "bright_yellow", | ||
| ] | ||
| import zlib | ||
|
|
||
| color = colors[zlib.crc32(short.encode("utf-8")) % len(colors)] |
Comment on lines
233
to
+240
| if work_dir: | ||
| work_path = Path(work_dir) | ||
| elif pipeline: | ||
| import deepzero.stages # noqa: F401 | ||
| from deepzero.engine.pipeline import load_pipeline | ||
|
|
||
| _setup_logging(False) | ||
| pipeline_def = load_pipeline(pipeline) | ||
| _load_env() |
Comment on lines
+469
to
+493
| per_stage: dict[str, dict[str, int]] = {} | ||
|
|
||
| if manifest: | ||
| for entry in manifest: | ||
| history = entry.get("history", {}) | ||
| for stage_name, stage_data in history.items(): | ||
| if stage_name not in per_stage: | ||
| per_stage[stage_name] = {"completed": 0, "filtered": 0, "failed": 0} | ||
|
|
||
| st = stage_data.get("status") | ||
| vd = stage_data.get("verdict") | ||
|
|
||
| if st == "failed": | ||
| per_stage[stage_name]["failed"] += 1 | ||
| elif st == "filtered" or (st == "completed" and vd == "filter"): | ||
| per_stage[stage_name]["filtered"] += 1 | ||
| elif st == "completed": | ||
| per_stage[stage_name]["completed"] += 1 | ||
|
|
||
| # merge active stats with disk cache for accuracy | ||
| cached_stats = run_state.stats.get("per_stage", {}) | ||
| for sn, sdata in cached_stats.items(): | ||
| if sn not in per_stage: | ||
| per_stage[sn] = sdata | ||
|
|
Comment on lines
+842
to
+844
| from deepzero.engine.types import RunStatus | ||
|
|
||
| self._active_run_state.status = RunStatus.INTERRUPTED |
Comment on lines
+841
to
+849
| if hasattr(self, "_active_run_state") and getattr(self, "_active_run_state", None): | ||
| from deepzero.engine.types import RunStatus | ||
|
|
||
| self._active_run_state.status = RunStatus.INTERRUPTED | ||
| self.state_store.save_run(self._active_run_state) | ||
| if hasattr(self, "_active_sample_states") and getattr( | ||
| self, "_active_sample_states", None | ||
| ): | ||
| self.state_store.save_manifest(list(self._active_sample_states.values())) |
Comment on lines
+57
to
+61
| If you intend to use the AI analysis stages, configure your API keys by creating a `.env` file from the provided layout: | ||
| ```bash | ||
| cp .env.example .env | ||
| ``` | ||
|
|
added 4 commits
April 16, 2026 19:13
…hman/DeepZero-Agentic-Vulnerability-Research-Pipeline into refactor/cli-telemetry-and-metrics # Conflicts: # README.md
…dling encapsulation
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.
No description provided.