Conversation
SummaryReading the full parser, all route and browser changes, the changed regression files, and the Agent cron artifact contract, I found one blocking historical-run bug. The parser itself is conservative about fences, quotes, duplicate markers, errors, and malformed artifacts. The problem is how the route chooses Code reference
get_job = getattr(cron_jobs, "get_job", None)
job = get_job(job_id) if get_job else None
job_mode = "unknown" if job is None else (
"script" if job.get("no_agent") else "agent"
)
projection = parse_cron_output_artifact(content, job_mode=job_mode)The same current-state lookup is repeated for history and output windows at
Diagnosis / recommendationDo not derive historical presentation from the mutable current job definition. Persist the run mode beside each output filename, or derive it from an immutable field in the saved artifact contract and use the current job only as a fallback for legacy files. Deleted jobs should remain unknown/raw unless their own run metadata proves agent mode. A minimal regression should create or fixture two historical artifacts under one job, change the current job from script to agent and then from agent to script, and verify that each artifact keeps its original projection. Also cover a deleted job and a script payload containing marker-like headings; both must remain raw. The browser response-first hierarchy at VerificationExact-head CI is green, but the current tests do not exercise mode mutation. No contributor-authored code was executed during this read-only review. Verdict: block until historical run mode no longer depends on the current job record. |
|
The historical mode now belongs to each saved artifact.
The regressions cover both job-edit directions, deleted jobs, legacy Agent fallback, failed and silent scripts, fenced and marker-like payloads, platform-stable raw bytes, usage isolation, cross-job path traversal, and all three route consumers. |
SummaryI re-pulled the current head into a read-only worktree and reviewed the complete parser, all route consumers, the browser projection, the changed regressions, and the Agent cron artifact envelope. The historical-mode blocker from my previous review is resolved. History, detail, and bounded-output routes now classify each saved artifact before consulting mutable job state; the current job mode is used only for genuinely legacy files. The parser also fails closed for producer-looking but malformed artifacts. Code referenceThe new ownership boundary is in if all(name in positions for name in ("job_id", "run_time", "mode")):
if (positions["job_id"] < positions["run_time"] < positions["mode"] and
positions["mode"] == positions["run_time"] + 1):
return "script"
if all(name in positions for name in ("job_id", "run_time", "schedule")):
...
return "agent"
return "unknown"
The browser now consumes that single projection at Diagnosis / recommendationI found no new blocker. The parser preserves exact raw content, ignores fenced marker-like text, rejects ambiguous response boundaries, and does not let response prose overwrite usage metadata. The tightened run-detail containment check is also correct: The conservative handling of producer-looking near misses is appropriate. A malformed current envelope remains raw rather than borrowing a possibly unrelated current job mode; deleted jobs can still classify canonical saved artifacts from their own metadata. Verification
No contributor-authored code was executed during this read-only review. Verdict: the previous blocker is fixed; no further blocker found. |
Gate certification: REDCertified contributor head: Current synthetic rebase: The complete suite/advisor/browser gate ran at synthetic head VerdictThe response-first information hierarchy is a clear improvement and the prior historical-mode blocker is fixed. This exact head still introduces one file-disclosure boundary regression, one blank-result parser regression, and mobile disclosure-control UX failures. Do not merge until these are fixed and freshly re-gated. Must fix 1: symlinked job directories escape the cron output root
job_dir = (CRON_OUT / job_id).resolve()
fpath = (job_dir / filename).resolve()
if not fpath.is_relative_to(job_dir): ...If the job directory itself is a symlink to an outside directory, both values resolve under the outside target and the check passes. A sandboxed production-handler probe created Current master rejects the same path at the cron-root boundary. Required fix: resolve Must fix 2: whitespace-only responses render as a blank primary resultBoth response branches in The route sends that projection to Required fix: use Must fix 3: mobile progressive-disclosure controls are undersized and inconsistentThe new responsive rule is scoped to
Fable confirms this from source and screenshots. It also places the full-response toggle after the usage footer rather than immediately after the primary response. Required fix:
What is correct
Gate evidence
Please fix the three groups and re-push for a fresh current-master gate. Preserve @rodboev’s attribution. No merge, tag, deployment, contributor-branch push, or issue closure was performed by the gate certifier. |
Thinking Path
What Changed
api/cron_output.py: adds the shared fail-closed response, diagnostics, and raw artifact projection, and resolves each saved run's Agent or script mode from its immutable artifact envelope. Current-job fallback is limited to unclassified legacy files.api/routes.py: applies per-file mode resolution to history, detail, and bounded-output routes while preserving exact raw content, usage data, limits, path checks, and legacy Agent marker-only behavior.static/panels.js: uses one projection for collapsed and expanded response views and adds separate diagnostics and raw disclosures.static/style.css: keeps the response hierarchy readable across desktop and narrow Tasks layouts.static/i18n.js: localizes the new disclosure and raw-output controls across all supported locales.tests/test_issue7303_cron_response_first.py: covers parser fallbacks, historical mode edits, deleted jobs, legacy fallback, marker-like script payloads, route fidelity, response expansion, accessibility, focus, and responsive rendering.tests/test_issue2289_cron_detail_expansion.py,tests/test_sprint10.py, andtests/test_v050257_opus_followups.py: preserve expansion, bounded-output, locale, and path-security contracts.Why It Matters
Scheduled reports become readable as reports instead of raw execution logs. Prompt and execution context stay available for debugging, and the exact saved artifact remains accessible without displacing the result.
Verification
The historical-mode regression fails on the pre-rework PR head because saved files inherit the current job's mode, and passes after per-file artifact resolution. Focused parser and route checks cover Agent-to-script and script-to-Agent edits, deleted and legacy jobs, failed and silent scripts, fenced and marker-like payloads, exact raw fidelity, usage extraction, and bounded windows; the existing headless browser, accessibility, locale, security, and narrow-layout checks remain green.
Risks / Follow-ups
Artifacts matching the current Agent and script envelopes are classified from their own saved metadata. Older unclassified artifacts retain the current-job fallback when that job exists; deleted or malformed producer-looking artifacts remain raw. The change preserves the existing raw artifact and file-read policy; bounded-read changes remain with #6141 . The accepted 1024x600 before/after capture is retained because this rework changes backend classification only; broader viewport sign-off remains external.
Contract Routing
Task type: Tasks UX and product-semantics enhancement.
Touched areas: cron artifact mode ownership, output parsing, run-detail API projection, responsive and accessible Tasks presentation.
Relevant public docs:
docs/UIUX-GUIDE.mddocs/CONTRACTS.mdScope boundaries: Historical presentation reads immutable fields already present in saved Agent and script artifacts; it does not change Agent output persistence, retention, filenames, schemas, or file-read bounds.
Evidence needed before claiming done: pre-rework red and post-rework green mode-mutation proof, focused fallback and security checks, the existing headless layout sweep, and the published before/after screenshots.
Upstream
Closes #7303.
Screenshots
Before, expanding a run places prompt and context ahead of the response.
After, the response stays primary while diagnostics and raw output remain available.
Model Used
GPT-5 via Codex CLI with headless Playwright layout and screenshot verification