You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- tests/workflow-architecture.test.ts:
* restore failing force_generation check by re-introducing `force_generation=false` literal
in each article-type workflow .md (Run-mode selection section)
* tighten no-timeout test from <= 90 min to <= 55 min (matches current standard)
- .github/prompts/00-base-contract.md: replace "25-min only reliable mitigation" with a
mode-aware guidance that aligns with the ~60-min token window and 55-min workflow cap
- .github/prompts/07-commit-and-pr.md: Deadline enforcement now a mode-aware table
(Analysis mode target 40–45min / hard 48min; Article mode target 20–25min / hard 30min)
instead of a single 25-min hard rule that would force early PRs on healthy analysis runs
- .github/prompts/03-data-download.md:
* Tier-C pre-flight now conditionally extends REQ with the 5 Tier-C artifacts when
$SUBFOLDER matches evening-analysis | week-ahead | month-ahead | weekly-review |
monthly-review | deep-inspection | realtime-*
* reconcile folder-reuse rule with legacy auto-suffix: base folder reused when
force_generation=false; suffix only as escape hatch when force_generation=true
- Installed gh-aw v0.69.3 (the CLI pinned in compile-agentic-workflows.yml) and
recompiled all 12 .lock.yml → compiler_version now v0.69.3 and
.github/aw/actions-lock.json picks up github/gh-aw-actions/setup-cli@v0.69.3
- Full vitest run: 107 files, 4324/4324 tests passing
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/aba5a55a-e7b3-4703-bd9d-a06176e7fa5b
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/prompts/00-base-contract.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Same-day re-runs always use the same `$ANALYSIS_DIR` folder — never create a p
64
64
65
65
To mitigate MCP idle-connection drops, workflows set `sandbox.mcp.keepalive-interval: 300` (5-minute ping). This keeps MCP connections alive but does **not** refresh the Copilot API token.
66
66
67
-
**The only reliable mitigation is to call`safeoutputs___create_pull_request`within 25 minutes of agent start**— before the token nears expiry. See `07-commit-and-pr.md §Deadline enforcement` for the mandatory early-PR procedure.
67
+
**The reliable mitigation is to ensure`safeoutputs___create_pull_request`is called well before the session approaches expiry.**Plan the run so the PR is created before the agent passes ~45 minutes of work — that leaves ~10 minutes of safety margin on the 55-minute `timeout-minutes` cap and ~15 minutes on the ~60-minute token window for staging and safe-outputs publishing. See `07-commit-and-pr.md §Deadline enforcement` for the mandatory PR-timing procedure.
68
68
69
69
Do not add per-phase checkpoint PRs or repo-memory push steps.
|`false`|**Analysis mode**| Continue with download pipeline below → `04-analysis-pipeline.md` → analysis-only PR (see `07-commit-and-pr.md`). Do **not** generate articles in this run. |
24
37
|`true`|**Article mode**| Skip the entire download pipeline and `04-analysis-pipeline.md`. Proceed directly to `06-article-generation.md`. Optionally re-query the API and compare against `data-download-manifest.md`; add only genuinely new `dok_id` entries found since the analysis ran. |
25
38
26
-
> **Folder reuse rule**: the same `$ANALYSIS_DIR` is always reused across runs for the same `$ARTICLE_DATE` + `$SUBFOLDER`. Never create `propositions-2`, `propositions-3`, etc. for the same date unless `force_generation=true`.
39
+
> **Folder reuse rule**: the same `$ANALYSIS_DIR` is always reused across runs for the same `$ARTICLE_DATE` + `$SUBFOLDER` when `force_generation=false`. The legacy auto-suffix behaviour (`propositions-2`, `propositions-3`, …) is retained **only** as an explicit escape hatch when `force_generation=true`, so that a forced rerun on a merged day can produce a fresh parallel analysis without trampling the existing one.
27
40
28
41
## Goal
29
42
@@ -45,7 +58,7 @@ Populate `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/` with raw Riksdag/Regering da
If the base subfolder already contains `synthesis-summary.md` from a prior merged run**and**`force_generation=false`, auto-suffix: `propositions-2`, `propositions-3`, …
61
+
If `force_generation=true` is supplied on a day whose base subfolder already contains `synthesis-summary.md` from a prior merged run, auto-suffix the subfolder (`propositions-2`, `propositions-3`, …) so the forced rerun does not overwrite the merged analysis. Under the default `force_generation=false`, the same base subfolder is reused across runs — see §Pre-flight above.
Copy file name to clipboardExpand all lines: .github/prompts/07-commit-and-pr.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,11 +102,18 @@ In every other case, commit whatever exists and call `create_pull_request` once.
102
102
103
103
> **Root cause**: The Copilot API session is bound to the `github.token` baked in at step start. That token expires at approximately **60 minutes** and is never refreshed mid-run (gh-aw issue #24920). Every tool call and inference request fails silently after that point — the agent appears to run but makes no progress and the PR is never created. Setup steps consume ~5 minutes, so the agent has at most **~55 minutes** of usable session time, and safe-outputs publishing needs several minutes on top.
104
104
105
-
**If the run exceeds 25 minutes with no safe-output call yet:**
105
+
The target PR-creation window depends on which mode the run is in (see `03-data-download.md §Pre-flight`):
106
+
107
+
| Mode | Target PR window | Hard deadline |
108
+
|------|------------------|---------------|
109
+
| Run 1 — Analysis | 40–45 min after agent start |**48 min**|
110
+
| Run 2 — Articles | 20–25 min after agent start |**30 min**|
111
+
112
+
**If the run exceeds its hard deadline with no safe-output call yet:**
106
113
107
114
1. Stop analysis / article work immediately.
108
115
2. Stage whatever exists on disk (analysis artifacts and/or partial articles).
109
116
3. Commit with message including `[early-pr]` to signal partial content.
110
117
4. Call `safeoutputs___create_pull_request` with label `analysis-only` if articles are incomplete.
111
118
112
-
Do not attempt to "save" work via a second PR — there is no second PR. Creating the PR early is always better than losing all work to a token expiry.
119
+
Do not attempt to "save" work via a second PR — there is no second PR. Creating the PR early is always better than losing all work to a token expiry. The hard deadlines above leave ~7 minutes of margin on the 55-minute `timeout-minutes` cap for staging and safe-outputs publishing before the ~60-minute Copilot API token expiry.
0 commit comments