Repository navigation
feat: automatic CLI request reports via telemetry controls - #276
Conversation
Enable library-backed reports through existing telemetry controls for supported pull and push commands. Preserve result channels, deferred diagnostics, error precedence, and diagnostic log ownership. Add focused physical-dispatch and sink-failure coverage for #261. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Read the stdout channel explicitly on both minimum and current Click, whose merged diagnostic output now includes the automatic request report. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce6c47fd41
ℹ️ 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".
There was a problem hiding this comment.
🟡 Changes recommended
Unprotected overlap between log and download destinations can corrupt downloaded payloads while the command still exits successfully.
4 open issues
What changed in this PR
Adds automatic CLI request reports using the existing library collector and telemetry controls, advancing #261 while leaving integrated validation and final documentation to #262 and #263.
Changes:
- Enables text or consolidated JSON reports on stderr, with diagnostic-log mirroring.
- Adds reporting to supported transfers and telemetry controls to Docker push.
- Adds focused coverage, updates existing fixtures, and documents reporting behavior.
| File | Description |
|---|---|
| src/regshape/tests/test_request_report_cli.py | Adds report and failure-boundary coverage. |
| src/regshape/tests/test_progress_display.py | Updates transport mocks and report assertions. |
| src/regshape/tests/test_manifest_cli.py | Checks Docker telemetry-log ownership. |
| src/regshape/tests/test_manifest_cli_progress.py | Mocks report-owned HTTP sessions. |
| src/regshape/tests/test_layout_push.py | Reads result JSON from stdout. |
| src/regshape/tests/test_image_progress.py | Adapts progress tests to automatic reports. |
| src/regshape/tests/test_component_cli.py | Updates report and error-order assertions. |
| src/regshape/tests/test_artifact_push.py | Adapts push fixtures and output assertions. |
| src/regshape/tests/test_artifact_pull_cli.py | Updates report, warning, and suppression checks. |
| src/regshape/tests/test_artifact_download.py | Checks warnings before reports. |
| src/regshape/tests/test_artifact_cli.py | Updates transport and diagnostic assertions. |
| src/regshape/libs/decorators/request_report.py | Accepts the shared text-output protocol. |
| src/regshape/cli/telemetry.py | Connects telemetry sessions to reporting. |
| src/regshape/cli/request_report.py | Adds rendering and report lifecycle management. |
| src/regshape/cli/manifest.py | Enables manifest transfer reports. |
| src/regshape/cli/layout.py | Enables push and dry-run reports. |
| src/regshape/cli/docker.py | Adds push reporting and telemetry controls. |
| src/regshape/cli/components.py | Enables component download reports. |
| src/regshape/cli/blob.py | Enables blob transfer reports. |
| src/regshape/cli/artifact.py | Enables artifact pull reports. |
| docs/library/telemetry.md | Documents automatic reports and failure behavior. |
| .github/workflows/tests.yml | Includes report tests in minimum-Click coverage. |
Review effort: Balanced
Acquire caller-owned reporting lazily at the first library operation scope. Preserve portable validation errors and explicitly suppress reporting in the downloader-only retry test. Reject manifest output aliases before opening diagnostic logs, including hard links and symlinks, with focused regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep healthy diagnostic sinks available after spool-read errors, fail on collection errors discovered during rendering, and expose suppressed telemetry cleanup failures without replacing primary exceptions. Reject blob/log aliases before telemetry acquisition. Ten focused regression cases reproduce the reviewed failures and pass with these corrections. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
A log/output path collision can silently corrupt verified blob downloads, while concurrent collector initialization can split reports and lose spool cleanup handles.
6 open issues
Synchronize lazy telemetry collector acquisition · New Reject log destinations that alias blob download output Propagate failed-destination state to the report adapter · New Expose telemetry cleanup failures when a primary error exists Mark stderr failed only after detected short writes Recheck collection errors after report export
Review effort: Balanced
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7621c6ac1f
ℹ️ 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".
Serialize lazy collector acquisition per configuration and recheck ownership under the lock. Propagate known failed destinations through nested diagnostic proxies so aliased result writes and flushes are not retried. Cover copied worker contexts and distinct descriptors for the same pipe, preserving primary errors and healthy report logs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
🔵 Needs a closer look
Concurrent first-scope acquisition can create multiple collectors for one configuration, splitting reports and leaving an overwritten collector inaccessible for normal export and cleanup.
No open issues 🎉
6 resolved since last review
Synchronize lazy telemetry collector acquisition Reject log destinations that alias blob download output Propagate failed-destination state to the report adapter Expose telemetry cleanup failures when a primary error exists Mark stderr failed only after detected short writes Recheck collection errors after report export
Review effort: Balanced
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Share the pre-telemetry file separation decorator across manifest and blob downloads and uploads. Reject path, symlink and hard-link aliases before opening logs or credentials, preserving upload inputs. Six added source-alias cases reproduce the missing preflight and pass alongside current/minimum Click command regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d34aba0c9
ℹ️ 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".
Apply shared log separation before layout telemetry, including dry runs and archive inputs. Reject directory-contained logs and ambiguous multiply-linked outside logs using bounded ancestor metadata rather than scanning the source graph. Nine directory metadata/content and archive alias cases fail before the guard and pass afterward; document the conservative outside-log policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Address the remaining #276 sink-coordination review findings without retrying failed output destinations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64f26a7cda
ℹ️ 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".
There was a problem hiding this comment.
🟡 Changes recommended
A critical issue remains: timed manifest result-output failures can trigger telemetry writes to the same broken pipe because aliased stdout/stderr proxies do not immediately share failure state.
1 open issue
2 resolved since last review
Review effort: Balanced
Keep Unicode and binary CLI results compatible while sharing no-retry failure state across adapted buffers for #276. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Prevent timed result failures from retrying a broken destination; preserve original errors and Click empty-probe behavior for #276. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because subtle interactions in output failure tracking, telemetry cleanup, exception chaining, and sink contracts can suppress reports, obscure original errors, or reject valid outputs.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Keep failed/cancelled row assertions for healthy terminals and verify no destination writes or flushes after a terminal failure. Preserve error identity, borrowed streams and resource cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |


Summary
Closes #261.
Related tracking issue: #254. Integrated readiness/security/performance validation (#262) and final feature documentation (#263) remain separate delivery items. Owner authorized merge after final-head green hosted checks and settled reviews; branch/worktree cleanup is not requested.
Final-head local validation (macOS, Python 3.12.16; source at a14c9c6)
Review and hosted checks
All fifteen known review threads are fixed and resolved with individual exact fix-SHA replies. Copilot/Codex reviewed 0bf4039 with no open findings. Its hosted matrix exposed a coupled artifact terminal assertion that expected cleanup to retry a known failed sink and repaint a Failed row, contradicting the required zero-retry contract. a14c9c6 preserves healthy terminal failed/cancelled row assertions, original error/storage/resource checks and now verifies exact no-write/no-flush counts after failure and borrowed streams remaining open. Disabling only the no-retry guard makes this strengthened regression fail (7 writes/6 flushes versus 4 writes/3 flushes at failure); the expanded full artifact selector passes on both Click versions. Production behavior remains unchanged from 0bf4039.
All 13 runnable hosted checks passed on a14c9c6; the optional dispatch-only benchmark was skipped by its existing condition. Final-head Copilot review and Codex review settled with no open findings. All fifteen resolved threads were verified to have separate exact fix-SHA replies. Prior-head retargeted-symlink macOS test passed on 0bf4039; no unrelated worker code/test changes. Owner explicitly authorized conditional merge after current-head validation and settled reviews; no protection bypass or branch/worktree cleanup is authorized.