#1139

fix(agent): publish complete advisory remediation PRs

Openiamgpwants to merge intofrom

Goal and scope

Make scheduled phlo-agent maintenance attempt verified, mechanical advisory fixes instead of stopping at an existing issue. Addresses the publishing blocker documented in #1206. This does not upgrade msgpack, waive findings, merge PRs, or change live automation.

Change map and risk

  • Run advisory remediation before routine maintenance, including outstanding bot-authored scanner issues. Resolve every affected consumer, verify candidate locks and focused checks, reuse existing remediation PRs, and retain issue-only escalation for blocked fixes.
  • Require complete delivery. A writer failure must not produce an arbitrary root-only subset or cite checks from a different local tree as verification of the published PR.
  • Increase only the draft-PR JSON request budget from 2.5 million to 20 million characters. Other routes, authentication, restricted paths, the 50-file limit, and PR-body limits remain unchanged.
  • Document the workflow and activation requirements. The larger authenticated request budget increases the writer's maximum per-request memory demand.

Verification

  • make setup and make check: passed during implementation.
  • node --experimental-strip-types --test .amp/plugins/phlo-github/lib.test.ts: 8 passed.
  • uv run --locked pytest tests/scripts/test_report_dependency_risk.py -q: 34 passed.
  • Writer npm test: 12 passed; npm run typecheck and npm run build: passed.
  • Plugin registration and skill discovery passed with webhook credentials omitted, without changing live webhook ownership.
  • Codespell, Markdown links, and git diff --check: passed.
  • Regression: the multi-consumer draft test failed with HTTP 413 before the limit change and passed afterward. Oversized drafts remain rejected, and other routes retain their smaller limit.
  • A local acceptance check submitted all 15 current root/example locks, 12,550,890 JSON characters, and received HTTP 201 for one complete draft. All GitHub traffic used a local fake; no live PR was created by that check.

Live scheduled-agent behaviour and Cloudflare resource usage have not been qualified by these local checks.

Recovery and maintainer decisions

After merge, the writer still needs an explicitly approved deployment. Existing maintenance threads also need an approved replacement/cutover to adopt the new agent definition; preserve their recurrence and timezone. No live schedule, webhook, or deployment changes are included here.

Rollback requires reverting the source changes, redeploying the previous writer, and restoring the previous maintenance configuration if activated. Existing remediation PRs are not deleted or rewritten. There are no data migrations. Merge and activation approval remain pending; no independent reviewer is claimed.


    

MinIO CI blocker follow-up

The installed-provider artifact job rebuilds the checkout's MinIO image. Its Trivy report identified CVE-2026-116587 (GHSA-mgcc-cww5-fp2q) in the explicitly pinned go-jose/v4 v4.1.4 inside the MinIO binary. Upgrade that pin to v4.1.6 and update the corresponding-source notice date. No vulnerability exception, image publication, or deployment is included.

Verification of the rebuilt image:

  • The original CI report fails the existing container security policy on this CVE; the rebuilt-image report passes that same policy.
  • Trivy 0.72.0 reports go-jose/v4 v4.1.6, zero occurrences of the target CVE, and zero fixable HIGH/CRITICAL findings.
  • An isolated disposable MinIO container passed readiness and an authenticated bucket/object write/read roundtrip.
  • The bundled corresponding-source archive contains v4.1.6 and the updated notice.
  • 101 focused MinIO/container/artifact tests passed (2 integration tests deselected); 17 container-security workflow tests and Dockerfile lint passed.

Fresh PR CI is running for the follow-up commit; the earlier failed run does not verify this head.

Activity

300
coldtea-pr-lens[bot]2d ago
  • Redraw · drawn at 8e6493f, the branch has moved on

Architecture


Data flow


Review

✨ Nothing flagged · reviewed 8e6493f


TIP

The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture… row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it. 

phlo-agent[bot]2d ago

Review of 8e6493f — no blocking correctness or security findings in the changed paths.

The request-limit change is correctly scoped: publisher.ts applies MAX_DRAFT_REQUEST_LENGTH only to /v1/draft-pull-requests (apps/phlo-github-writer/src/publisher.ts:6-8, :63-72, call site :398-400), authentication still runs before the body is read, and both the content-length and actual-length checks remain. The regression test sends 13 files (~11.8M characters) and asserts every blob and tree entry; the companion test keeps 20M+ drafts rejected and holds /v1/issues at 2.5M. The maintenance tool posts to this route and resolves omitted content from the checkout, so the larger budget covers the real publishing path, and the existing checkout/HEAD guard still prevents publishing from the wrong tree.

The advisory-first instructions and docs match the implementation: the security / dependency assessment job and dependency-assessment-* artifact exist in security.yml, the bot-sender statement matches parseGitHubEvent, and the writer's 50-file/path rules cover the 13-lock msgpack inventory. #1206 is a bot-authored agent/msgpack-1-2-4 draft based on bc530bc, so the pullNumber reuse path can add the 12 missing example locks; the measured 15-lock payload (12.55M characters) fits the new budget.

Remaining items:

  • CI is red at this head. ci / python / installed provider artifacts (0) failed at 07:29 UTC, so ci / ci / status also fails. The same job passed on the base commit bc530bc, and this diff does not touch provider artifacts, so the cause is not evident from the change — rerun or confirm before merge. docs / docs / build was still running.
  • The raised budget is only exercised against a Node fake. The real boundary is the Cloudflare Worker's 128 MB isolate while parsing ~12.5M characters and base64-encoding 13 blobs; the PR correctly notes Cloudflare resource usage is unqualified. A Wrangler/miniflare run with the actual 15-lock payload, plus the post-merge writer deployment, is the check that proves the original HTTP 413 is gone in production.
  • Completeness is still prompt-enforced. The writer accepts any 1–50 files, so "complete delivery" depends on the new instructions rather than an API check. This is consistent with the current design, but a partial publish remains possible if a future run deviates.