Skip to content

chore: sync workflow templates#330

Closed
stranske wants to merge 1 commit intomainfrom
sync/workflows-5cdaefb6e7dd
Closed

chore: sync workflow templates#330
stranske wants to merge 1 commit intomainfrom
sync/workflows-5cdaefb6e7dd

Conversation

@stranske
Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • agents-keepalive-loop.yml: Keepalive loop - continues agent work until tasks complete (deprecated; replaced by agents-81-gate-followups.yml, removal no earlier than 2026-02-15)
  • agents-71-codex-belt-dispatcher.yml: Codex belt dispatcher - selects issues and creates agent branches for work
  • agents-72-codex-belt-worker.yml: Codex belt worker - executes agent on issues with full prompt and context
  • agents-73-codex-belt-conveyor.yml: Codex belt conveyor - orchestrates belt worker execution and handles completion
  • agents-autofix-loop.yml: Autofix loop - dispatches Codex when autofix can't fix Gate failures (deprecated; replaced by agents-81-gate-followups.yml, removal no earlier than 2026-02-15)
  • agents-autofix-dispatcher.yml: Autofix dispatch bridge - listens for Gate repository_dispatch events and triggers the autofix loop
  • agents-issue-optimizer.yml: Issue optimizer - LangChain-based issue formatting and optimization (Phase 1)
  • agents-guard.yml: Agents guard - enforces agents workflow protections (Health 45)
  • agents-auto-pilot.yml: Auto-pilot - end-to-end automation orchestrator (format → optimize → agent → verify)
  • agents-weekly-metrics.yml: Weekly metrics - aggregates auto-pilot, keepalive, autofix and verifier metrics into summary reports
  • maint-coverage-guard.yml: Coverage guard - daily baseline monitoring with automatic issue creation
  • maint-76-claude-code-review.yml: Claude Code review (opt-in) - runs only on labeled PRs or manual dispatch
  • reusable-pr-context.yml: Reusable PR context workflow - centralized PR data fetching via GraphQL
  • requirements-llm.txt: Pinned LLM dependencies - required by agents-auto-pilot.yml
  • AGENTS.md: Context file for agents and coding assistants
  • CLAUDE.md: Context file for Claude/AI assistants
  • WORKFLOW_USER_GUIDE.md: Workflow user guide - explains the CI/agent system for repo consumers

Files Skipped

  • pr-00-gate.yml: File exists and sync_mode is create_only
  • ci.yml: File exists and sync_mode is create_only
  • dependabot.yml: File exists and sync_mode is create_only
  • llm_slots.json: None

Review Checklist

  • CI passes with updated workflows
  • No repo-specific customizations were overwritten

Source: stranske/Workflows
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: 5cdaefb6e7dd

Changes synced from sync-manifest.yml
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 22:21
@stranske-keepalive
Copy link
Copy Markdown
Contributor

⚠️ Action Required: Unable to determine source issue for PR #330. The PR title, branch name, or body must contain the issue number (e.g. #123, branch: issue-123, or the hidden marker ).

@stranske-keepalive
Copy link
Copy Markdown
Contributor

stranske-keepalive bot commented Mar 24, 2026

🤖 Keepalive Loop Status

PR #330 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Disposition skipped (transient)
Gate success
Tasks 0/21 complete
Timeout 45 min (default)
Timeout usage 8m elapsed (19%, 37m remaining)
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

@stranske-keepalive
Copy link
Copy Markdown
Contributor

stranske-keepalive bot commented Mar 24, 2026

Keepalive Work Log (click to expand)
# Time (UTC) Agent Action Result Files Tasks Progress Commit Gate
0 2026-03-24 22:23:12 Codex wait (missing-agent-label-transient) skipped 0 0/21 cancelled
0 2026-03-24 22:24:06 Codex wait (missing-agent-label-transient) skipped 0 0/21 cancelled
0 2026-03-24 22:26:53 Codex wait (missing-agent-label-transient) skipped 0 0/21 cancelled
0 2026-03-24 22:30:14 Codex wait (missing-agent-label-transient) skipped 0 0/21 success

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs this repo’s workflow templates and supporting docs with the upstream stranske/Workflows consumer template set, primarily updating pinned GitHub Action SHAs and refreshing agent/workflow documentation.

Changes:

  • Update pinned SHAs for several GitHub Actions used across agent/maintenance workflows.
  • Refresh consumer-facing docs (AGENTS.md, CLAUDE.md, WORKFLOW_USER_GUIDE.md) to match upstream template wording and guidance.
  • Adjust pinned LangChain/LLM Python dependencies used by workflow automation (tools/requirements-llm.txt).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/requirements-llm.txt Updates strict pins for workflow-only LLM dependencies used by auto-pilot.
WORKFLOW_USER_GUIDE.md Updates version/tag management documentation section (floating-tag guidance).
CLAUDE.md Replaces with streamlined consumer-repo workflow policy and references.
AGENTS.md Replaces with streamlined consumer-repo workflow policy for agents.
.github/workflows/reusable-pr-context.yml Updates actions/create-github-app-token pin.
.github/workflows/maint-coverage-guard.yml Updates create-github-app-token and download-artifact pins.
.github/workflows/maint-76-claude-code-review.yml Updates anthropics/claude-code-action pin.
.github/workflows/agents-weekly-metrics.yml Updates create-github-app-token pin.
.github/workflows/agents-keepalive-loop.yml Updates setup-node and create-github-app-token pins.
.github/workflows/agents-issue-optimizer.yml Updates create-github-app-token pin.
.github/workflows/agents-guard.yml Updates create-github-app-token pin.
.github/workflows/agents-autofix-loop.yml Updates create-github-app-token pin(s).
.github/workflows/agents-autofix-dispatcher.yml Updates create-github-app-token pin.
.github/workflows/agents-auto-pilot.yml Updates create-github-app-token and setup-node pins; continues using tools/requirements-llm.txt.
.github/workflows/agents-73-codex-belt-conveyor.yml Updates create-github-app-token pin.
.github/workflows/agents-72-codex-belt-worker.yml Updates create-github-app-token pin.
.github/workflows/agents-71-codex-belt-dispatcher.yml Updates create-github-app-token pin.

Comment on lines +85 to +87
## Agent-Specific Note

### Main CI (push to `main`)

Main CI uses `.github/workflows/ci.yml`:

- Runs pytest **with coverage** and enforces `coverage-min`.
- Runs pytest **in parallel** with xdist (`--dist loadscope`).
- Runs **all** tests including `slow`-marked ones.
- This is where heavyweight pipeline and spec-fixture tests are validated.

### Slow tests

Tests that take a long time because they parse real Excel workbooks or run
full pipeline orchestration are tagged `@pytest.mark.slow`. The Gate
excludes them so PR feedback stays under five minutes; Main CI runs them on
every merge.

Currently slow-marked tests:

| File | Why it's slow | How it's marked |
|------|---------------|-----------------|
| `tests/pipeline/test_run_pipeline.py` | Each `test_run_pipeline_*` calls `run_pipeline()` with real Excel fixtures (100-170 s per test) | Auto-marked by `tests/pipeline/conftest.py` hook |
| `tests/spec/test_macro_spec_fixtures.py` | Session-scoped fixture parses three NISA workbooks (~85 s) | Module-level `pytestmark = pytest.mark.slow` |

#### When to mark a test slow

Mark a new test `@pytest.mark.slow` if it:

- Calls `run_pipeline()` or `run_pipeline_with_config()` with real fixture files.
- Relies on a session-scoped fixture that parses large workbooks.
- Takes more than ~30 s on CI in isolation.

You can apply the marker with a decorator (`@pytest.mark.slow`) or add the
test pattern to the `pytest_collection_modifyitems` hook in the appropriate
`conftest.py`.

#### Running slow tests locally

```bash
# Run only slow tests
pytest -m slow

# Run everything (same as Main CI)
pytest

# Run without slow tests (same as Gate)
pytest -m "not slow"
```

### Release tests (nightly or label)

The slowest release/packaging checks are isolated behind the `release` marker and can be triggered via:

- Nightly schedule (`.github/workflows/release-e2e.yml`)
- PR label: `run-release`

### Agent guidance

- When a PR touches release/packaging mechanics (e.g., `release.spec`, `pyinstaller_runtime_hook.py`, templates/config bundling), make sure `release` tests run by applying the `run-release` label.
- When adding tests that parse real workbooks or run full pipeline orchestration, mark them `@pytest.mark.slow` so the Gate stays fast. Do **not** add heavyweight tests without the marker — it will regress Gate duration for every PR.

## Agent guardrails (must follow)

- Also read: `.github/codex/AGENT_INSTRUCTIONS.md`
- Do not modify protected workflow/security files unless explicitly allowed.
- Do not introduce secrets into logs/files.
- Keep changes scoped to the PR’s tasks.

## Definition of done (per milestone)

Milestone 1 (Parity using MOSERS-formatted inputs):
- Parse MOSERS-format workbooks into canonical tables.
- Update historical workbooks by appending a new row.
- Update monthly PPT (screenshots replaced + links refreshed or static distribution output).
- Produce run manifest + data quality summary.

Milestone 2 (Remove VBA/manual prep):
- Ingest raw NISA monthly inputs and generate MOSERS-format structures without running macros.
- Automate cash ingestion (structured source preferred; PDF fallback + overrides).
- Add prior-month futures delta/sign-flip logic for Trend.

## Where to look for keepalive system docs

- `WORKFLOW_USER_GUIDE.md` (labels, triggers, operator usage)
- `docs/KEEPALIVE_TROUBLESHOOTING.md` (deep debugging and known failure modes)
- `CLAUDE.md` (consumer repo boundaries and “what not to edit”)
This file is the agent-generic contract. Keep it materially aligned with `CLAUDE.md`; differences between the two should only be agent-specific execution notes, not different repository rules.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGENTS.md and CLAUDE.md now contain nearly identical rule sets, which creates duplication and a high risk of future drift despite the "keep aligned" note. Consider making one file authoritative (e.g., CLAUDE.md for consumer/workflow policy) and having the other link to it while containing only the truly agent-specific details.

Copilot uses AI. Check for mistakes.
# Check sync manifest for what SHOULD be here
gh api repos/stranske/Workflows/contents/.github/sync-manifest.yml --jq '.content' | base64 -d
```
Keep this file materially aligned with `AGENTS.md`. Differences between the two should only be agent-specific execution notes, not different repository rules.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The closing note asks to keep CLAUDE.md "materially aligned" with AGENTS.md, but both files are intended for different audiences (workflow/consumer policy vs project agent guide per README). This coupling makes it harder to evolve either document independently; consider narrowing the alignment requirement to shared consumer-policy points and explicitly separating project-specific guidance into AGENTS.md (or another project doc).

Suggested change
Keep this file materially aligned with `AGENTS.md`. Differences between the two should only be agent-specific execution notes, not different repository rules.
Use this file as the source of truth for workflow and consumer-repo policy. When `AGENTS.md` covers the same consumer-policy rules, keep those overlapping points consistent between the two. Put project- or agent-specific execution guidance in `AGENTS.md` (or other project docs), not here.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to 8
# AGENTS.md - Consumer Repository Context

This file is the “mission briefing” for coding agents working in this repository. It is project-specific. For workflow/consumer-repo rules, also read **CLAUDE.md**.
> Read this before changing workflows, prompts, or synced automation files.

## What this project is
## This Is A Consumer Repo

Counter_Risk replaces a spreadsheet-based monthly counterparty risk process. The end state is:
Most workflow logic for this repository lives in `stranske/Workflows`. The consumer repo should only carry repo-specific configuration unless it has an explicitly documented exception.

Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGENTS.md is linked from README as the "Project agent guide", but the updated content is now generic consumer-workflow context (largely duplicating CLAUDE.md) and no longer provides Counter_Risk/project-specific guidance. Consider restoring a project-focused agent briefing here (and keeping consumer workflow rules in CLAUDE.md), or updating the docs/navigation so readers aren't misled about what AGENTS.md contains.

Copilot uses AI. Check for mistakes.
@stranske
Copy link
Copy Markdown
Owner Author

Superseded by #331 after the Workflows source sync fix landed.

@stranske stranske closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated sync from Workflows sync Automated sync from Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants