Files
agent-runtime-framework/memory/log/2026-05-04.225112.md
Paul O'Reilly f5968cfab5 feat: migrate missing harnesses, templates, and workflows from agent-runtimes
Brings the framework CRS repo up to date with all content that was
living in agent-runtimes (local-dev fallback) but hadn't been promoted.

New composites: feature-delivery-loop, integration-direct, scaffolding-repo,
sonnet-impl-narrow, sonnet-manager, test-writing-repo

New contexts: integration/v1, scaffolding/v1, sonnet-manager/v1, z-ai/v1,
airouter/v1/bin (anthropic-compat-wrapper.sh), cp-harness/v1/init.sh

New task-templates: sonnet-integrator.yaml, workflow/* (17 typed workflow
task templates for the Epic 1 pipeline)

Updated: agent-repo/v1/finalize.sh — adds AR-38/F97 empty-deliverable audit
(SKIP_BRANCH_PUSH support, boilerplate-path filtering, ci_metadata.json flag)

Also adds MEMORY.md index and memory/ topic files for the framework repo.
2026-06-23 08:59:01 +12:00

3.3 KiB

Session Log -- 2026-05-04

Summary

Implemented 5 planned fixes for BUG-5 (.agent-output/ silent drops) and BUG-20 (MiniMax finalize no-push): pre_test.sh harness hook, output validation in finalize, push retry with debug tracing, spec-planning workflow output tags, and wrong-path detection with agent correction re-invoke. Fork cleanup PR merged, agent-monitor PR #44 merged.

Decisions

  • Fork cleanup workflow (PR #1 on agent-runtimes-agents): weekly cron deletes task-* branches inactive for 7+ days; main reset to orphan commit if no commits for 7+ days. Supports dry-run via workflow_dispatch. Merged (2026-05-04 10:39 UTC by admin).
  • Gitea API token auth requires HTTP Basic Auth (auth=("user","pass")) not Bearer token — Bearer returns 401 even with valid access token. Use httpx.get(..., auth=("user","pass")) pattern.
  • Shallow clone (--depth 1) for task branches in fork cleanup to avoid bloating with full history.

Gotchas Discovered

  • [Gitea Gotchas] Gitea API endpoint /login is 404 Not Found — use /users/<username>/access_tokens to create tokens, or use HTTP Basic Auth directly against any /api/v1/ endpoint with auth=("user","pass").
  • [Gitea Gotchas] PR state closed with merged: true means the PR was merged (not just closed). Gitea distinguishes merged vs closed states.
  • [Gitea Gotchas] Fork PRs use the parent repo's Actions (has_actions=true on parent, has_actions: false on fork). Fork cleanup workflow runs on the fork's GHA because fork enables Actions independently.
  • [tokens] Token file at ~/.config/agent-runtimes/tokens.json uses flat structure: {"access_token": "...", "expires_at": N}. Token was valid (not expired at session continuation time: now 1777891716 vs expiry 1777891804).

Key Context

  • agent-runtime-framework 8bbf6cb: pre_test.sh created (harness-level test folder revert), finalize.sh gains set -x tracing, push retry (AGENT_PUSH_RETRIES), output validation (AGENT_EXPECTED_OUTPUT), wrong-path detection + .correction-prompt.txt sentinel for entrypoint re-invoke. All 17 spec-planning workflow nodes tagged with output: {path, min_bytes}.
  • agent-runtimes-agents fork: fork-cleanup branch merged to main (PR #1 by ai_enablement, merged by admin 2026-05-04). Workflow file at .gitea/workflows/cleanup.yaml.
  • agent-runtimes 148d9d3: PR #44 merged — scripts/agent-monitor gains provider and model_full columns.
  • agent-runtimes local uncommitted: M22 Phase 3 manifests work (controlplane/api/manifests.py, controlplane/db/manifest_store.py, migration 20260504_0017_m16_phase3_manifests.py, controlplane/manifests/). Not related to this session's focus.
  • Two ops gates pending before M22 Phase 9 live cutover: CI build agent-runtimes-init:1.0.0 image; agent-session Role deployed via homelab/agent-runtimes-deploy + ArgoCD sync.

Process Notes

  • When verifying PR state via Gitea API: parse JSON directly (don't assume specific keys — use json.dumps(..., indent=2) to inspect full structure).
  • Fork cleanup workflow commits to agent-runtimes-agents fork main; parent agent-runtimes main unchanged. Fork's main tracked via agent-runtimes-agents remote in local agent-runtime-framework checkout.
  • Fork cleanup's fetch-depth: 0 is needed for commit date inspection even with shallow clones elsewhere.