fix(aw): prevent safeoutputs session timeout in news-committee-reports#1895
fix(aw): prevent safeoutputs session timeout in news-committee-reports#1895
Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/e5c1b0c0-241b-4d97-bb0c-b7cda85b55e0 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
Updates the news-committee-reports agentic workflow instructions to avoid safeoutputs Streamable-HTTP session expiry by forcing an earlier “heartbeat” PR, ensuring partial work is preserved even if later safeoutputs calls fail.
Changes:
- Added a prominent mandatory early Heartbeat PR gate near the top of the workflow instructions.
- Moved the heartbeat window earlier (to ~minute 13–15) and adjusted the time budget steps accordingly, including explicit “no manual post-editing” guidance.
- Regenerated the lock file, picking up a compiler-emitted
aw_context_workflows/aw_contextschema field for dispatch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/news-committee-reports.md | Adds early-heartbeat guidance and updates the run timeline to prevent safeoutputs session timeout. |
| .github/workflows/news-committee-reports.lock.yml | Compiler-emitted lockfile update adding aw_context_workflows and an aw_context input in the dispatch schema. |
| - **Minutes 6–13**: 🚨 **AI Analysis Pass 1 (Part A — 7 min)**: Start per-file analysis for the highest-significance documents first (synthesis-summary.md + top 3 dok_ids' analyses + risk-assessment.md stub) so the Heartbeat PR at minute 15 has real content, not empty stubs. | ||
| - **Minutes 13–15**: 🫀 **MANDATORY EARLY Heartbeat PR** — `git add` whatever analysis artifacts exist in `analysis/daily/$ARTICLE_DATE/committeeReports/` (even partial), `git commit -m "wip: committee-reports heartbeat {date}"`, then **`safeoutputs___create_pull_request`** with title `🫀 Heartbeat - Committee Reports - {date}` and **`draft: true`**. Run `git checkout main` after the call so subsequent commits don't stack onto the frozen patch. This **resets the safeoutputs session idle timer** (~30–35 min window) AND preserves work if later phases fail. **NON-NEGOTIABLE: if you reach minute 18 without a successful heartbeat PR, stop all other work and call it immediately.** | ||
| - **Minutes 15–22**: 🚨 **AI Analysis Pass 1 (Part B — 7 min)**: Complete per-file analysis for EVERY remaining document with Mermaid diagrams, evidence tables, SWOT entries (total Pass 1 ≥ 14 min). | ||
| - **Minutes 22–28**: 🚨 **AI Analysis Pass 2 (6 min)**: Read ALL analysis artifacts back, improve every section, replace ALL script stubs with AI analysis. Run enrichment verification gate. |
There was a problem hiding this comment.
The updated time budget conflicts with the workflow’s own minimum-pass requirements: the intro section defines Analysis Pass 1 = 15 min and Pass 2 = 7 min, but the schedule now allocates Pass 1 as 7+7 (=14) and Pass 2 as 6. Also calling out a "risk-assessment.md stub" clashes with later rules that all stubs must be replaced. Suggest either (a) adjust the minute allocations to meet 15/7 (and the deep-depth 15 min minimum), or (b) update the stated minimums/wording so the document is internally consistent, and avoid encouraging “stub” files unless they’re explicitly completed before the final PR.
| - **Minutes 40–43**: Validate, commit, create **FINAL (non-draft)** PR with `safeoutputs___create_pull_request`. This is your second and last PR call (`max: 2`). | ||
| - **Minutes 43–45**: 🚨 **HARD DEADLINE** — If the final PR call fails with `session not found`, the heartbeat PR from minute 15 already preserves partial work. Do NOT call `safeoutputs___noop` in that case — the heartbeat PR is your output. | ||
|
|
||
| > ⚠️ **Analysis phase is 22 minutes minimum (Pass 1: 15 min + Pass 2: 7 min)** — every analysis file must contain color-coded Mermaid diagrams, structured evidence tables with dok_id citations, and follow template structure exactly. ALL script-generated stubs MUST be replaced with AI-enriched analysis. Run the ENFORCED gates from SHARED_PROMPT_PATTERNS.md before proceeding to article generation. |
There was a problem hiding this comment.
This note still states "Pass 1: 15 min + Pass 2: 7 min", but the revised schedule above is Pass 1 ≥ 14 min and Pass 2 = 6 min. Please update this line (or the schedule) so readers don’t get contradictory instructions about required analysis time.
| > ⚠️ **Analysis phase is 22 minutes minimum (Pass 1: 15 min + Pass 2: 7 min)** — every analysis file must contain color-coded Mermaid diagrams, structured evidence tables with dok_id citations, and follow template structure exactly. ALL script-generated stubs MUST be replaced with AI-enriched analysis. Run the ENFORCED gates from SHARED_PROMPT_PATTERNS.md before proceeding to article generation. | |
| > ⚠️ **Analysis phase is 22 minutes minimum (Pass 1: ≥14 min + Pass 2: 6 min)** — every analysis file must contain color-coded Mermaid diagrams, structured evidence tables with dok_id citations, and follow template structure exactly. ALL script-generated stubs MUST be replaced with AI-enriched analysis. Run the ENFORCED gates from SHARED_PROMPT_PATTERNS.md before proceeding to article generation. |
|
@copilot apply changes based on the comments in this thread |
…ports Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/e046c60d-ab2b-4aef-9486-3e5cf64084b7 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Addressed both reviewer threads in 4d346ee. Rebalanced the time budget to Pass 1 = 15 min (7 Part A + 8 Part B) and Pass 2 = 7 min so it matches the |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Fix: News: Committee Reports — "No Safe Outputs Generated" session timeout
Root cause
Run 24709578961 produced zero safe outputs: the agent spent ~37 min doing forbidden
python3HTML post-edits, then everysafeoutputs___*call failed withError POSTing to endpoint: session not found(Streamable-HTTP idle timeout ~30–35 min). The documented Heartbeat PR was never called.Changes (
.github/workflows/news-committee-reports.md)python3/heredoc/sedpost-editingdeepdepth tier minimum)Validation
gh aw compile news-committee-reports→ ✓ 0 errors, 0 warnings.lock.yml)parallel_validationon prior commit: Code Review 0 comments, CodeQL 0 alerts