Skip to content

Fix scheduled slow-suite regressions - #413

Merged
justin808 merged 42 commits into
mainfrom
codex/409-scheduled-slow-suite
Sep 4, 2026
Merged

Fix scheduled slow-suite regressions#413
justin808 merged 42 commits into
mainfrom
codex/409-scheduled-slow-suite

Conversation

@justin808

@justin808 justin808 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Why

The scheduled Slow suite exposed runtime and test-infrastructure failures that obscured real regressions and could leak test capacity: stale-app cleanup could target the wrong app, temporary authentication and process captures could survive failures, transient Control Plane state was treated as permanent, delayed one-off logs could disappear, and a half-created shared fixture could be reused across many examples.

What changed

  • scope stale-app lookup and suspension to the matched GVC and tolerate concurrent disappearance
  • restore or remove temporary profiles and stderr captures on success and failure
  • retry bounded workload-image conflicts and unavailable cron-status observations
  • drain delayed one-off output for a bounded monotonic window while preserving ordered stdout and stderr
  • delimit runner finish markers after unterminated output and require an exact marker record
  • keep captured image-update output streaming live when command output is visible
  • keep interrupted, unreaped image-update subprocesses registered for bounded process cleanup
  • redact supported sensitive option spellings from command text, captures, exceptions, spawned invocations, and PTY output
  • bound spawned-process TERM/KILL cleanup
  • make shared fixture lookup fail closed, delete incomplete run-owned apps after preparation failure, and prevent reuse while an accepted deletion is still converging
  • cap reconciliation log reads, upgrade an outage deadline after a finish marker, and avoid broad false-positive conflict retries

Addresses #409. The issue remains open until a natural scheduled Slow run succeeds on merged main.

Validation

Exact head: 497ef920c855db6675fa8a00562e62083cab59e2
Integrated base: 5ff40c95d6f9284f2846968ade82d355ad692937

  • final review remediation: focused runner/deploy suite 117 examples, 0 failures (seed 26575); full RuboCop 218 files, no offenses; generated command docs and git diff --check clean; independent autoreview clean
  • affected credential-free unit/support suite on the earlier reviewed head: 223 examples, 0 failures (seed 38787)
  • current-head integration suite before the final review-only remediation: 205 examples, 0 failures (seed 49501); focused runner/shell/control-plane suite: 130 examples, 0 failures (seed 30592)
  • trusted GitHub Actions security scan: clean across 23 workflow/action files
  • independent fixture-hardening, marker-protocol, and semantic merge reviews: clean
  • full Slow run 33811361874 on prior head 9ff35e66 finished with 10 failures: nine missing-log/Loki-ingestion symptoms also observed on main or older heads amid shared quota pressure, plus one unrelated PostgreSQL disconnect; a fresh natural scheduled Slow green remains the post-merge gate
  • exact-head hosted Fast and review validation are pending; the PR Slow job is intentionally skipped

The complete credentialed suite cannot run locally without CPLN_ORG and Control Plane credentials. Hosted exact-head validation remains a merge gate.

Checklist

  • This PR addresses an accepted issue or maintainer request.
  • The change is focused and contains no unrelated cleanup.
  • Tests, documentation, and changelog entries are updated where applicable.
  • I reviewed and understand all submitted content, including AI-assisted changes.
Agent details

Final review follow-up

  • Initial log requests now also use the 30-second cap, so a stalled first read cannot prevent status polling. Red/green regression verified by an internal worker; focused suite 117/0 (seed 26575).
  • Codex delta autoreview: clean, with all 73 runner unit tests passing. Claude local second pass was attempted but unavailable: OAuth session expired and could not be refreshed. Fresh hosted review remains required.
  • The retry budget intentionally follows the latest error class; no session-wide escalation was added. Numeric attached-token handling matches Thor 1.5.0; a direct parser probe and 10 command-logging tests verified this. See current thread replies for details.
  • Full local validation was attempted but could not finish successfully without CPLN_ORG/Control Plane credentials. Focused tests, all 218 RuboCop files, docs, and diff checks passed.

QA evidence

  • QA lane: cpf-wave2-pr413-maker-r2; active numeric claim for PR Fix scheduled slow-suite regressions #413.
  • Tested at: 497ef920c855db6675fa8a00562e62083cab59e2 locally against base 5ff40c95d6f9284f2846968ade82d355ad692937.
  • Automated checks: final focused runner and deploy-image suite 117/0 seed 26575; RuboCop 218/0; docs and diff clean; independent autoreview clean; hosted exact-head checks pending.
  • Manual checks: retained failure evidence was inspected before designing the fixture state machine; independent reviews verified cleanup/convergence, the final exact-record marker protocol, and the PR Fix scheduled slow-suite regressions #413/Bound cpflow run status reconciliation after command completion #453 semantic merge.
  • User-visible UI change: no.
  • Release-blocking status: exact-head hosted Fast, review, full Slow post-merge evidence, security preflight, and merge-readiness replay.
  • Process-gap disposition: checklist and replay.

Coordination and scope boundary

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes several scheduled slow-suite regressions. The main changes are:

  • Stops only configured workloads that still exist in stale apps.
  • Handles upstream authorization failures inside the progress step.
  • Retries workload image updates before reporting endpoints.
  • Compares parsed shell tokens in the build-image test.

Confidence Score: 4/5

Ambiguous stale-app config matches can leave live workloads running.

  • The new stop path selects one matching config before intersecting workload names.
  • Overlapping prefix matches can select an incomplete workload list and silently skip required stops.
  • The retry and upstream-profile cleanup changes are consistent with their callers.

lib/command/cleanup_stale_apps.rb

Important Files Changed

Filename Overview
lib/command/cleanup_stale_apps.rb Adds live-workload filtering, but ambiguous prefix-based config matches can leave workloads running.
lib/command/copy_image_from_upstream.rb Converts upstream forbidden responses into normal failed-step handling while preserving profile cleanup.
lib/command/deploy_image.rb Adds bounded retries and records endpoints only after a successful image update.
lib/core/controlplane.rb Returns the workload-update command result so the deploy command can retry failures.
spec/command/build_image_spec.rb Makes the build argument assertion independent of raw shell escaping.

Reviews (1): Last reviewed commit: "Fix scheduled slow-suite regressions" | Re-trigger Greptile

Comment thread lib/command/cleanup_stale_apps.rb Outdated
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

Walkthrough

The changes update Controlplane workload execution, stale-app suspension, image deployment retries, job log draining, upstream error handling, sensitive-data redaction, and scheduled-suite regression coverage.

Changes

Reliability fixes

Layer / File(s) Summary
Control-plane workload execution
lib/core/controlplane.rb, spec/core/controlplane_spec.rb
Workload operations support explicit GVCs. Command execution supports argument arrays, subprocess options, captured output, status retrieval, and PID tracking.
Workload image deployment and endpoint reporting
lib/command/deploy_image.rb, lib/core/controlplane.rb, spec/command/deploy_image_unit_spec.rb, spec/command/deploy_image_spec.rb, spec/command/promote_app_from_upstream_spec.rb
Image updates use bounded retries, including an extended conflict limit. Endpoint reporting uses deployment-status fallback and supports missing endpoints.
App lifecycle and upstream error handling
lib/command/cleanup_stale_apps.rb, spec/command/cleanup_stale_apps_spec.rb, lib/command/copy_image_from_upstream.rb, spec/command/copy_image_from_upstream_unit_spec.rb, docs/commands.md
Stale-app cleanup suspends only configured live workloads. Forbidden upstream requests return failure output and preserve temporary-profile cleanup.
Job status and post-terminal log draining
lib/command/run.rb, spec/command/run_unit_spec.rb, spec/command/run_spec.rb, CHANGELOG.md
Non-interactive runs drain delayed logs within a bounded deadline and handle unavailable job statuses with bounded retries.
Sensitive command and result redaction
spec/support/command_helpers.rb, spec/support/log_helpers.rb, spec/support_specs/command_helpers_spec.rb
Command logs, command results, and raised error JSON redact values matching the supplied sensitive-data pattern.
Slow-suite regression validation
spec/command/build_image_spec.rb, spec/command/ps_stop_spec.rb, spec/dummy/.controlplane/controlplane.yml
Tests use shell-safe command matching, select one replica identifier, and configure the dummy runner timeout.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to a8826

The PR improves scheduled job cleanup, polling, and credential handling, but the current implementation can poll continuously while active jobs emit logs, risking rate limits and incomplete streaming; a terminal command path may also record credential-bearing arguments without redaction, and cleanup wording remains misleading. Merge should wait for the polling fix and explicit follow-up on the bounded security and documentation risks.

Sequence Diagram(s)

sequenceDiagram
  participant Run
  participant Controlplane
  participant JobLogs
  Run->>Controlplane: Resolve job status
  Run->>JobLogs: Poll logs during drain deadline
  JobLogs-->>Run: Return changed or finished logs
  Run-->>Controlplane: Resolve final exit status
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes address the runtime regressions described for issue #409, but the issue also requires confirmation after a scheduled Slow suite succeeds. The selected exact-head Slow run remains in progre… Complete a successful scheduled Slow suite run at the exact pull request head, then update the pull request with the run result and confirm that issue #409 is resolved.
Docstring Coverage ⚠️ Warning Docstring coverage is 5.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 15 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The implementation, tests, documentation, and changelog updates all support the scheduled Slow suite regression fixes and related issue requirements. No unrelated code changes are evident.
Title check ✅ Passed The title is concise and clearly identifies the primary change: repairing scheduled Slow-suite regressions.
Description check ✅ Passed The description provides the change rationale, issue reference, detailed validation evidence, and a completed checklist. It uses "Why" and "What changed" instead of the template's "Summary" heading, b…
Full details: Linked Issues check

Explanation

The changes address the runtime regressions described for issue #409, but the issue also requires confirmation after a scheduled Slow suite succeeds. The selected exact-head Slow run remains in progress, so the acceptance requirement is not yet complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 5.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 15 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/409-scheduled-slow-suite

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review: Fix scheduled slow-suite regressions (PR 413)

Overview: this PR addresses four independent regressions surfaced by the scheduled slow-suite run — (1) cleanup-stale-apps --mode=stop now only stops workloads that are both configured and still live, (2) copy-image-from-upstream catches ForbiddenError inside the progress step so the temp profile is cleaned up via a normal "failed!" step instead of an unhandled exception, (3) deploy-image retries transient workload image-update failures for up to 30s before giving up, (4) the slow build-image spec matches parsed shell tokens instead of a raw regex. The fix is narrowly scoped to the diagnosed seams and is backed by new/updated unit specs (cleanup_stale_apps_spec.rb, copy_image_from_upstream_unit_spec.rb, deploy_image_unit_spec.rb, controlplane_spec.rb).

Code quality

  • stop_configured_live_workloads (lib/command/cleanup_stale_apps.rb) is a clean, well-scoped fix: fetching live workloads and intersecting with configured ones (app_workloads + additional_workloads) avoids the previous unscoped ps:stop -a app call failing on workloads that no longer exist. Good test coverage of the intersection logic.
  • The copy_image_from_upstream.rb fix is narrowly targeted at the specific ForbiddenError case reported by the diagnosis, consistent with the existing broad-rescue pattern already used in maintenance_mode.rb for similar eventually-consistent polling.
  • build_image_spec.rb's switch from a raw regex match to Shellwords.split + token-pair comparison is a solid fix for shell-escaping brittleness.

Potential issues

  1. deploy_image.rb: the 30s retry now applies uniformly to all image-update failures, not just transient ones. cp.workload_set_image_ref switched from perform! (immediate Shell.abort on any failure) to perform wrapped in a retry_on_failure step. Since perform cannot distinguish a transient failure from a permanent one (bad workload name, invalid image ref, auth error, etc.), every failure now takes up to ~30 seconds (30 attempts times 1s) to surface instead of failing fast. This is a UX/perf regression for the common case of a deterministic misconfiguration, and arguably in tension with the decision log ("Bound retries... without hiding permanent failures") — it does not hide them, but it does delay reporting them by up to 30s every time. Worth considering whether permanent failures can be classified and fast-failed. See inline comment.

  2. deploy_image.rb: the retry boundary also covers endpoint_for_workload, not just the image update call, which is inconsistent with the stated decision to "retry only the Control Plane workload image update, not the surrounding deploy sequence." Because both cp.workload_set_image_ref and deployed_endpoints[workload] = endpoint_for_workload(workload_data) run inside the same retried block, a transient failure to resolve/propagate the endpoint (independent of whether the image update itself already succeeded) will cause the block to return falsy and re-issue the cpln workload update command again on the next attempt — a redundant (if idempotent) re-PATCH triggered by an unrelated read-side hiccup. Consider moving the endpoint lookup out of the retried block once updated is true. See inline comment.

  3. Minor: stop_configured_live_workloads raises a bare RuntimeError ("Cannot find config for stale app...") outside of a step block, so it propagates as an unhandled-looking exception rather than a formatted "failed!" step — though this matches existing patterns elsewhere in the codebase (e.g. ensure_upstream_org!), so it is consistent, just noting for awareness.

Security
No new security concerns. The ForbiddenError message rendering was verified via the new unit spec to not leak the upstream token (expect(progress.string).not_to include("invalid-token")), a good, deliberate check.

Tests
Coverage looks solid and matches the diagnosed seams — retry-then-succeed and retry-exhausted-then-fail paths are both tested for deploy-image, and the stale-app workload intersection is tested for both configured/live and configured/missing/unconfigured-but-live cases.

Comment thread lib/command/deploy_image.rb Outdated
Comment thread lib/command/deploy_image.rb
Comment thread lib/command/cleanup_stale_apps.rb Outdated
Comment thread lib/command/deploy_image.rb
Comment thread spec/command/build_image_spec.rb
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review: Fix scheduled slow-suite regressions (#413)

Overview

This PR fixes four independent regressions surfaced by the scheduled slow-suite run (issue #409):

  1. cleanup-stale-apps --mode=stop now stops only the intersection of configured workloads (app_workloads + additional_workloads) and live workloads fetched from the GVC, instead of blindly delegating to ps:stop -a app (which fails if a configured workload no longer exists).
  2. copy-image-from-upstream now rescues ControlplaneApiDirect::ForbiddenError inside the fetch_upstream_image_url step, converting an unhandled exception into a clean failed-step message before the ensure block cleans up the temporary profile.
  3. deploy-image retries workload_set_image_ref up to 30 times (1s apart) via with_retry, and only records a deployed endpoint after a successful update. This required switching Controlplane#workload_set_image_ref from perform! (hard abort) to perform (returns a boolean) so failures are retryable rather than fatal.
  4. The slow build-image spec now matches on parsed Shellwords tokens instead of a raw regex, avoiding false negatives from shell-escaping changes.

Code quality

  • Changes are narrowly scoped to the actual regression seams, consistent with the PR's stated intent — no unrelated refactors.
  • Good use of existing helpers (with_retry, step) rather than reinventing retry/error-reporting logic.
  • New unit specs (copy_image_from_upstream_unit_spec.rb, additions to deploy_image_unit_spec.rb, cleanup_stale_apps_spec.rb, controlplane_spec.rb) directly target each fixed seam and assert both the happy path and the bounded-failure path (e.g. exhausting all 30 retry attempts).
  • stop_configured_live_workloads correctly reuses Config#find_app_config's existing prefix-matching (match_if_app_name_starts_with) semantics, so dynamically-named stale apps still resolve their config the same way stale_apps discovery does.

Potential issues (posted inline)

  • cleanup_stale_apps.rb: Array(app_config[:app_workloads]) treats a missing config key as [] rather than raising, unlike the previous delegation through Config#[] which raised a clear "Can't find option" error. A stale app missing app_workloads in controlplane.yml would now silently stop nothing instead of failing loudly. Likely a rare edge case in practice, but worth confirming it's intentional.
  • deploy_image.rb: The step block's last statement is deployed_endpoints[workload] = endpoint_for_workload(workload_data), whose value becomes the step's success/failure signal. If endpoint_for_workload returns nil (DNS unresolvable and the deployments API hasn't caught up yet), the step is reported as failed and the whole deploy aborts — even though the actual image update already succeeded. This is pre-existing behavior (not introduced by this PR), but since this PR is specifically about tolerating eventual consistency in this exact code path, it may be worth extending the same tolerance to endpoint resolution.
  • build_image_spec.rb: relies on Shellwords being transitively loaded rather than requiring it explicitly in the spec file (minor hygiene nit; controlplane_spec.rb does require it explicitly).

Security

  • No secrets are leaked in the new error paths: ForbiddenError#message is built only from the URL and HTTP response, and the new spec explicitly asserts the upstream token never appears in progress output.
  • The perform!perform change for workload_set_image_ref is scoped to its single call site (deploy_image.rb), so the loss of the automatic Shell.abort doesn't silently affect other commands.

Performance

  • stop_configured_live_workloads now issues one run_cpflow_command("ps:stop", ...) per matched workload rather than a single ps:stop -a app call, which is less efficient (separate Thor/command dispatch per workload) but necessary to skip workloads that no longer exist; acceptable trade-off given cleanup-stale-apps is not a hot path.
  • The bounded retry loop in with_retry sleeps once more than strictly necessary after the final failed attempt (pre-existing behavior of the shared helper, not new to this PR) — worst case adds ~1s to the ~30s failure window.

Test coverage

Solid — each of the four fixes has a matching unit spec that exercises both success and bounded-failure paths, and the PR body documents the validation that was run (49 examples passing, lint/docs clean). The main gap is that end-to-end (real cpln) coverage is explicitly deferred to the hosted CI slow-suite run per the PR description, which is a reasonable trade-off given the local CPLN_ORG limitation noted.

Overall this is a well-scoped, well-tested bug-fix PR. The inline notes above are minor/edge-case observations rather than blockers.

Comment thread lib/command/cleanup_stale_apps.rb
Comment thread lib/command/cleanup_stale_apps.rb
Comment thread lib/command/deploy_image.rb Outdated
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review

Focused, well-scoped fix for the four regressions found by the scheduled slow-suite run (issue #409). Each fix is narrowly targeted and backed by a new/updated unit spec that pins the exact failure mode it addresses.

Overview

  1. cleanup-stale-apps --mode=stop (lib/command/cleanup_stale_apps.rb) — now stops only workloads that are both configured (app_workloads + additional_workloads) and still live in the GVC, instead of a blanket ps:stop -a app. Missing config keys now raise a clear error instead of an opaque crash.
  2. copy-image-from-upstream (lib/command/copy_image_from_upstream.rb) — fetch_upstream_image_url now rescues ControlplaneApiDirect::ForbiddenError (a StandardError, not caught by step's existing rescue RuntimeError) so the temporary upstream profile is still cleaned up via the ensure block instead of leaking.
  3. deploy-image (lib/command/deploy_image.rb, lib/core/controlplane.rb) — workload_set_image_ref now returns a boolean (perform instead of perform!) so the caller can retry transient failures up to 30 attempts / 1s apart before giving up, and only records the deployed endpoint after a confirmed successful update.
  4. Test hardening (spec/command/build_image_spec.rb) — the slow build-arg assertion now parses the spawned command with Shellwords.split and checks token adjacency instead of matching a raw, escaping-sensitive regex.

Strengths

  • Each fix maps 1:1 to a diagnosed regression, with no unrelated scope creep.
  • The ForbiddenError rescue is verified to not leak the upstream token into progress/stderr output (spec/command/copy_image_from_upstream_unit_spec.rb), which is a nice security-conscious touch.
  • New specs cover both the happy path and the boundary cases (missing config keys, exhausted retries, endpoint-resolution failure after a successful image update).
  • required_app_option's error message replaces what would otherwise be a raw NoMethodError inside ps:stop for unmatched stale apps — better operator experience.

Minor suggestions (left as inline comments)

  • required_app_option guards against a missing config key but not an explicit nil value (e.g. app_workloads: with no items), which would still hit a raw NoMethodError on the + — slightly undercuts the goal of a friendly error message.
  • --mode=stop now silently skips live-but-unconfigured workloads (a behavior change from stopping all live workloads) — documented in LONG_DESCRIPTION, but a progress.puts noting what was skipped could help operators notice unexpected drift between the GVC and controlplane.yml.
  • Noted (non-blocking) that with_retry treats a signal-killed cpln process (nil from perform) the same as a normal failure — consistent with existing perform/perform! semantics elsewhere, so likely fine as-is.

Risk/Correctness

No security concerns beyond the token-leak check above, which is already covered. The perform!perform change in workload_set_image_ref has a single call site and it's updated correctly to handle the new falsy-return contract. Retry bound (30 attempts × 1s) is reasonable and documented in the decision log.

Nothing blocking — nice, surgical PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
spec/command/cleanup_stale_apps_spec.rb (1)

132-141: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Adapt test to allow optional additional_workloads.

If additional_workloads is relaxed to be an optional configuration key as suggested in lib/command/cleanup_stale_apps.rb, this test should be updated to verify that the method succeeds (or falls back to an empty array) rather than expecting it to raise an error.

♻️ Proposed test update
-    it "raises when the stale app config does not define additional_workloads" do
+    it "succeeds when the stale app config does not define additional_workloads" do
       allow(config).to receive(:find_app_config)
         .with("stale-app")
         .and_return({ app_workloads: ["rails"] })

-      expect { command.send(:process_app, "stale-app") }
-        .to raise_error("Can't find option 'additional_workloads' for app 'stale-app' in 'controlplane.yml'.")
-      expect(cp).not_to have_received(:fetch_workloads)
-      expect(command).not_to have_received(:run_cpflow_command)
+      command.send(:process_app, "stale-app")
+
+      expect(cp).to have_received(:fetch_workloads)
     end
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spec/command/cleanup_stale_apps_spec.rb` around lines 132 - 141, Update the
“raises when the stale app config…” example around command.send(:process_app,
"stale-app") to reflect optional additional_workloads: expect processing to
succeed and use an empty workload list when the key is absent, while preserving
assertions that no workload fetch or cpflow command occurs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@spec/command/cleanup_stale_apps_spec.rb`:
- Around line 132-141: Update the “raises when the stale app config…” example
around command.send(:process_app, "stale-app") to reflect optional
additional_workloads: expect processing to succeed and use an empty workload
list when the key is absent, while preserving assertions that no workload fetch
or cpflow command occurs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 643b4f88-6ab0-4d0c-8fe5-863c3c51a971

📥 Commits

Reviewing files that changed from the base of the PR and between 26bdb56 and 5309f20.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • lib/command/cleanup_stale_apps.rb
  • lib/command/copy_image_from_upstream.rb
  • lib/command/deploy_image.rb
  • lib/core/controlplane.rb
  • spec/command/build_image_spec.rb
  • spec/command/cleanup_stale_apps_spec.rb
  • spec/command/copy_image_from_upstream_unit_spec.rb
  • spec/command/deploy_image_unit_spec.rb
  • spec/core/controlplane_spec.rb

@justin808

Copy link
Copy Markdown
Member Author

Address review is complete at exact head 5309f208028a4db68e3ee54d160042251eb1438b.

Implemented findings:

  • restricted the retry boundary to the workload image update so endpoint lookup is never retried after a successful update (1b1c403)
  • restored validation of both required workload keys before any Control Plane read and added an explicit shellwords require (5309f208)

Verified decisions:

  • bounded retry of permanent failures is an accepted tradeoff at the boolean command seam
  • explicit-nil behavior preserves the pre-existing Config#[] contract; broader schema validation is outside Scheduled slow suite failing #409
  • live-but-unconfigured workloads are deliberately skipped and documented; per-workload logging is optional UX
  • retrying a signal-killed child matches existing perform/perform! semantics
  • CodeRabbit's suggestion to make additional_workloads optional was rejected because it conflicts with the existing required-key contract

Skipped as non-actionable: the unreachable ambiguous-prefix scenario and unchanged endpoint-nil semantics. All nine review threads are now resolved, and the independent exact-head code audit is clean.

Merge remains blocked only by external GVC capacity: exact-head run 29492232103, artifact 8373278529, failed 13 live-fixture examples after 39 setup attempts were rejected at the org's 20/20 quota. No destructive cleanup was performed.

@justin808

justin808 commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Canonical blocked-batch handoff for cpf-slow-suite-20260715-2057 / CPF-C-issue409-reef.

Immediate maintainer attention

  • Final state: external-gate-failing at exact head 5309f208028a4db68e3ee54d160042251eb1438b.
  • Required operator action: separately authorize cleanup of stale CI GVCs in shakacode-heroku-to-control-plane-ci, or have Control Plane raise the GVC quota above 20.
  • Resume gate: rerun Fast at this exact head, trigger the relevant manual/scheduled Slow workflow at the same SHA, rescan current-head comments/checks, then merge only when every gate is green.
  • Post-merge gate: replay the appropriate workflow on current main; close Scheduled slow suite failing #409 only with linked passing evidence.

FYI / decisions made

  • Code/review result: clean; all nine current review threads resolved.
  • Hosted result: only RSpec (Fast) / rspec is red. Run 29492232103 and artifact 8373278529 show 39 HTTP 429 GVC-quota rejections causing all 13 failed examples.
  • Safety boundary: no live GVC cleanup, deployment, or other destructive mutation was performed.
  • Merge authority: auto_merge_when_gates_pass; merge was correctly withheld because the full gate is not green.
  • Merge ledger: n/a per repository AGENTS.md.
  • Issue state: Scheduled slow suite failing #409 remains open because there is no passing Fast and Slow replay.

Independent checker verdict: BLOCKED_EXTERNAL, not implementation-blocked.

Target stale-app stops to configured live workloads, contain upstream authorization failures inside the progress step, and retry transient workload image updates before reporting endpoints. Update the build spec to compare shell tokens instead of raw escaping.
@justin808
justin808 force-pushed the codex/409-scheduled-slow-suite branch from 5309f20 to 261d849 Compare July 18, 2026 11:20
Comment thread lib/command/cleanup_stale_apps.rb Outdated
Comment thread lib/command/deploy_image.rb Outdated
Comment thread CHANGELOG.md Outdated
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Summary

This PR fixes four independent regressions surfaced by the scheduled slow-suite run for issue #409. Each fix is narrowly scoped and backed by new/updated unit tests. Overall the change is well-reasoned and low-risk; I traced through the control flow for each fix and did not find correctness bugs, only a few things worth being aware of.

What the PR does

  • cleanup-stale-apps --mode=stop: now stops only the intersection of configured (app_workloads + additional_workloads) and live workloads, instead of blindly running ps:stop -a app, avoiding failures when a configured workload was already removed.
  • copy-image-from-upstream: catches ControlplaneApiDirect::ForbiddenError inside the fetch_upstream_image_url step so it is reported as a clean "failed!" step message instead of escaping to the generic "Unable to load command: ..." handler in lib/cpflow.rb (confirmed ForbiddenError < StandardError, not RuntimeError, so it previously bypassed step's rescue and Cli's inner rescue RuntimeError).
  • deploy-image: Controlplane#workload_set_image_ref switched from perform! to perform, and the call site now wraps it in with_retry (30 attempts, 1s wait) so eventually-consistent image-update failures get retried before the endpoint is reported.
  • build_image_spec.rb: slow-suite assertion now parses the actual Process.spawn command with Shellwords.split and checks token adjacency instead of matching a raw regex against escaped output.

Correctness

  • Verified workload_set_image_ref is only called from this one site, so the perform! to perform change is safely contained.
  • Verified the upstream-profile cleanup ensure block in copy_image_from_upstream.rb#call already ran regardless of exception type before this PR, so the real fix here is error-message quality/exit path, not profile leakage -- the PR description slightly overstates this, but the fix itself is correct and worthwhile.
  • The configured_workloads & live_workloads intersection correctly implements "skip configured-but-removed, skip live-but-unconfigured," matching the updated LONG_DESCRIPTION.
  • Confirmed the new --workload flag usage matches ps_stop.rb's existing workload_option.

Minor points (posted inline)

  • cleanup_stale_apps.rb: stopping workloads one-by-one via run_cpflow_command now spawns a full CLI invocation per workload (was one call total before). Correct given ps:stop's workload option is not repeatable, but worth knowing the overhead scales with workload count.
  • deploy_image.rb: since perform cannot distinguish transient vs. permanent failures, the 30s retry window now also delays reporting deterministic failures (bad image ref, permissions, etc.). Already acknowledged in the PR's decision log as an accepted tradeoff.
  • CHANGELOG.md: the new entry does not include a PR link/author credit, unlike the entry directly above it.
  • Small duplication: required_app_option in cleanup_stale_apps.rb re-implements the same "raise unless key present" pattern as Config#[] (lib/core/config.rb:88-92), just parameterized over an arbitrary app instead of the command's own config.app. Not a bug, just a note in case a shared helper is ever worth extracting.

Test coverage

Good coverage of the new behavior: workload-filtering (including both "missing required option" error paths), the forbidden-error/profile-cleanup path (with an explicit assertion that the token itself is never printed), and all three retry outcomes for the image-update path (success-after-retry, endpoint-resolution failure after a successful update, and exhausting the retry budget). The build_image_spec.rb fix is a reasonable, self-contained test-only correction.

Security

No concerns -- the upstream-token handling change actually improves things (test explicitly asserts the token never appears in printed output), and no new user input is passed unsanitized to shell commands.

No blocking issues found.

@justin808

Copy link
Copy Markdown
Member Author

Address-review summary

Scan scope: since previous summary at 2026-07-16T11:10:42Z.

Mattered

  • None. The exact-head review produced no correctness, security, reliability, or test blocker.

Optional

  • Per-workload CLI overhead — auto-deferred/declined at the final-candidate gate. Verified that ps:stop accepts one workload, so a repeatable interface would expand scope; the current configured-and-live intersection is intentional.
  • Changelog PR/author metadata — auto-deferred/declined at the final-candidate gate. The current entry has replayable issue linkage and accurate behavior; a nit-only push would restart exact-head Fast and Slow integration gates.

Skipped

  • Bounded retry also covers deterministic failures — informational and already documented as an accepted tradeoff. The boolean-only command seam cannot safely classify failure causes; the 30-attempt bound and nonzero terminal result are tested.

All three exact-head threads were replied to and resolved. No branch change was made; candidate SHA remains 261d849efbdcc6d120a93c268f8d3bdb24f79fde.

Next default scan starts after this comment. Say check all reviews to rescan the full PR.

…d-slow-suite

* canonical/main:
  Pin GitHub Actions and generate auditable local actions (#451)
  Bound cpflow run status reconciliation after command completion (#453)

# Conflicts:
#	CHANGELOG.md
#	lib/command/run.rb
#	lib/core/shell.rb
…low-suite

* origin/main:
  Queue all shared-org RSpec waiters (#457)

# Conflicts:
#	CHANGELOG.md
@justin808

Copy link
Copy Markdown
Member Author

Evidence for the current lane owner (no code pushed from this session): Greptile's P1 on #458 (lib/command/run.rb, "Status outage truncates log drain") is about code that lives in this PR, and it reproduces by inspection at head 80ab83707555f0ddac2d60df0ef4140b235f42d8.

Path in show_logs_waiting:

  1. reconciled_job_status starts reconciliation_deadline with origin :status_outage after the sixth unavailable status (120 s).
  2. Status then recovers straight to a terminal value, so exit_status becomes non-nil. The elsif only resets the deadline for active/pending, so the outage deadline is retained.
  3. Back in the loop, if exit_status && reconciliation_deadline.nil? is false, so the :terminal drain never starts; the loop exits at the remaining outage deadline (possibly seconds), then warns that the marker "was unavailable after 120 seconds".

Smallest fix: when exit_status first becomes non-nil while reconciliation_deadline_origin == :status_outage, restart the deadline as monotonic_time + POST_TERMINAL_LOG_DRAIN_SECONDS with origin :terminal, keeping the already-frozen @post_terminal_log_from (it is older, so the log window stays wider). A related edge worth a decision: :status_outage_after_finish_marker never converts back to the configured finish-marker reconciliation window when status recovers to active, so an outage that starts before the marker caps reconciliation at the outage deadline instead of job_status_reconciliation_timeout.

Also FYI: main moved (#457 merged), so this branch now conflicts on CHANGELOG.md only.

@justin808

Copy link
Copy Markdown
Member Author

🤖 Codex fixed the terminal-recovery log-drain regression at exact head f771bc0d27b0f3bdeda9c056b7a5d74359a9303a.

The regression test failed before the implementation change and now passes. The fix gives terminal recovery a fresh 120-second monotonic drain window while preserving the query boundary frozen during the outage, so late-ingested logs are not excluded.

Validation: runner unit suite 68 examples / 0 failures (seed 6674); changed-file RuboCop clean; trusted Actions scan clean; independent corrected-head autoreview clean after 89 examples / 0 failures (seed 40988). Hosted exact-head checks are now running.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f771bc0d27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/command/run.rb Outdated
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review summary

Reviewed the diff (2076 additions, mostly lib/command/run.rb, lib/command/deploy_image.rb, lib/command/cleanup_stale_apps.rb, lib/core/controlplane.rb, lib/core/shell.rb + specs). Focused on correctness, since this PR touches the job-status/log-reconciliation state machine that issue #409 is about.

Two correctness issues found in the rewritten show_logs_waiting/reconciled_job_status state machine in lib/command/run.rb (inline comments below):

  1. The new :status_outage_after_finish_marker origin value is assigned but never read anywhere else in the method — it's a dead state. When a status outage occurs before the finish marker is seen, hitting the finish marker afterwards fails to upgrade the reconciliation window from the short 120s outage budget to the full job_status_reconciliation_timeout (default 1200s) that the finish-marker path is meant to grant.
  2. exit_status ||= reconciled_job_status(...) permanently latches on the first non-active/pending/nil status read and never polls again afterward (since ||= short-circuits once truthy). This removes the previous code's self-correction: the old job_finished_count reset to 0 on any subsequent active/pending read, giving a flaky/stray terminal-looking status a chance to be superseded. Now a single spurious read permanently decides the exit code with no way to recover.

Both look like they'd reintroduce the same class of flakiness this PR is otherwise fixing, specifically under a status-outage-then-recovery scenario, which is plausible given issue #409's description of Control Plane's cron-status endpoint being intermittently unavailable.

Lower-severity items (not inline, just noting):

  • lib/command/deploy_image.rb: WORKLOAD_IMAGE_UPDATE_CONFLICT_PATTERN = /\b409\b|conflict/i matches the word "conflict" anywhere in command output, not just an HTTP 409. A non-retryable validation error whose message happens to contain "conflict" would get the 120-attempt/~2min budget instead of failing fast at 30 attempts. Low risk, just delays failure reporting.
  • lib/command/cleanup_stale_apps.rb: stop_configured_live_workloads reimplements logic already in Command::PsStop#stop_workloads (including re-deriving workload suspension), and doesn't reuse wait_for_workloads_not_ready. Consider extracting the shared step instead of duplicating it.
  • Minor N+1: stop_configured_live_workloads fetches the workload list up front, then set_workload_suspend re-fetches each workload individually — avoidable extra GETs per stale app.

Nothing security-sensitive stood out beyond the intentional redaction work described in the PR body, which looks reasonable on inspection. Test coverage for the new retry/redaction/fixture paths looks thorough per the PR's validation section.

Comment thread lib/command/run.rb Outdated
Comment thread lib/command/run.rb
Comment thread lib/command/deploy_image.rb Outdated
@justin808

Copy link
Copy Markdown
Member Author

🤖 Codex completed the current-head review pass at d48032d3a4717e5e4b1454c366f1b7424c47ea79.

All four new review threads are handled and resolved: three fixes were pushed (bounded log reads, finish-marker deadline upgrade, and narrow conflict matching), and the terminal-status latch was retained as intentional because Control Plane terminal status for the exact job ID is authoritative.

Local closeout: focused runner/deploy suite 116 examples, 0 failures (seed 34932); RuboCop 218 files, no offenses; generated docs and diff clean; independent autoreview clean. Hosted exact-head checks and fresh automated review are now the remaining non-human gates.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d48032d3a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/command/run.rb Outdated
Comment thread lib/command/deploy_image.rb
Comment thread spec/support/command_helpers.rb
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review summary

Reviewed the full diff (lib/, spec/support/, and the associated unit specs). This PR is a large, well-tested hardening pass on the scheduled Slow suite: stale-app workload targeting, transient workload_set_image_ref retries, bounded post-terminal log draining/status reconciliation in cpflow run, credential redaction in test logs, and bounded subprocess cleanup. The added unit coverage (run_unit_spec.rb, controlplane_spec.rb, command_helpers_spec.rb, spawned_command_spec.rb) is unusually thorough and exercises most of the new state-machine edge cases directly.

Two lower-confidence points worth a look, left as inline comments:

  1. lib/command/deploy_image.rb (workload_image_update_limit) — the retry-attempt cap is recomputed per-iteration from the current failure's output rather than fixed for the session. If a run mixes conflict (409/Conflict, 120-attempt cap) and non-conflict (30-attempt cap) failures, a stray non-conflict blip after attempts > 30 can prematurely abort a retry sequence that was otherwise converging under the conflict cap. Not covered by the new specs, which each use a single uniform failure type.
  2. spec/support/command_helpers.rb (SENSITIVE_ATTACHED_SHORT_VALUE_PATTERN) — attached short-option redaction (-t<value>, no =/space) only matches purely numeric values, so a real (non-numeric) token supplied that way wouldn't be redacted from spec logs. Test names suggest this intentionally mirrors a Thor CLI parsing quirk (Thor apparently only produces this smashed form for numeric values) — if so, a short comment explaining that would help avoid it looking like an oversight later.

Everything else I traced through (the run.rb status/log reconciliation state machine, set_workload_suspend's missing_ok race handling, Shell.use_tmp_stderr's nested-capture restore, perform_with_output's pipe draining and $child_pids bookkeeping for interrupted subprocesses, and the cleanup-stale-apps --mode=stop GVC-scoping change) matched its tests and looked correct, including the intentional stderr-into-stdout merge in runner_script for deterministic marker ordering. No security issues found beyond the redaction-completeness note above (no new injection surface — command strings are built the same way as the pre-existing perform! path).

@justin808

Copy link
Copy Markdown
Member Author

🤖 Codex completed this review pass at 497ef92. The initial-log timeout regression is fixed; the retry-policy and Thor-parser questions are answered without changing their intended behavior. This is a non-cutoff status; the next review pass should use check all reviews.

Review outcomes and verification
  • Fixed: initial log requests are now capped at 30 seconds before a reconciliation deadline exists. Red/green regression and reply: Fix scheduled slow-suite regressions #413 (comment)
  • Declined: a session-wide extended retry budget would let unrelated failures inherit conflict retries. Existing policy intentionally follows the latest error: Fix scheduled slow-suite regressions #413 (comment)
  • Optional explanation recorded: Thor 1.5.0 numeric attached-option parsing was verified directly; no broad token grammar was added: Fix scheduled slow-suite regressions #413 (comment)
  • Claude summary Fix scheduled slow-suite regressions #413 (comment) repeats those two dispositions. Codex review summary is boilerplate; no separate action needed.
  • Verification: runner/deploy 117/0 (seed 26575), command logging 10/0 (seed 15367), RuboCop 218/0, docs and diff clean. Full local validate attempted but credentialed integration could not complete without CPLN_ORG.
  • Autoreview receipt: source=autoreview; target=uncommitted delta against d48032d; resulting committed head=497ef920c855db6675fa8a00562e62083cab59e2; engine=codex review --uncommitted, session 01a06af1-e21b-7ee2-af9d-8254b0d452c5; included run.rb and run_unit_spec.rb, excluded unchanged PR content; correctness/reliability/security/coverage checked, 73 runner tests passed, no actionable findings. Mutable-diff receipt is partial; no whole-PR or hosted approval is claimed. Independent finding validation by internal worker initial_log_timeout confirmed the bug with red/green evidence. Local Claude second pass unavailable due expired OAuth. Simplify not run for this narrow two-file repair; no broad refactor warranted.
  • Fresh hosted validation and reviewer evidence are pending. No merge performed; exact-head human risk approval remains required after other gates pass.

Comment thread lib/command/run.rb
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review summary

This is a large (2.2k line) refactor of the runner/deploy/cleanup reliability logic plus test infrastructure hardening. I traced the main production-code paths in detail:

lib/command/cleanup_stale_apps.rb / lib/core/controlplane.rb — Scoping stale-app workload lookup/suspension to the matched GVC (fetch_workloads(app), set_workload_suspend(workload, true, app, missing_ok: true)) correctly tolerates concurrent app/workload disappearance by treating a nil result as success rather than raising. Config validation (required_app_option) still runs before the live-workload check, so misconfiguration is still caught. Looks correct.

lib/core/shell.rbuse_tmp_stderr now saves/restores the previous @tmp_stderr instead of unconditionally nil-ing it, which fixes real breakage on nested calls, and switches to block-form Tempfile.create so the file is actually unlinked afterward. Good fix.

lib/command/copy_image_from_upstream.rb — Rescuing ControlplaneApiDirect::ForbiddenError (a StandardError, not RuntimeError) inside fetch_upstream_image_url is correct and necessary — without it, this exception would previously bypass step's rescue RuntimeError and blow up ungracefully instead of reporting a clean step failure.

lib/command/deploy_image.rb — The bounded retry loop (update_workload_image_ref) recomputes the attempt-limit from the latest error output each iteration (30 attempts normally, 120 if the output looks like an optimistic-concurrency conflict). This is a deliberate design per the PR description; the tests cover the escalating/de-escalating transitions.

lib/core/controlplane.rb#perform_with_output — New pipe-based stdout/stderr capture with live streaming. Cleans up pipes in ensure, and intentionally leaves the pid in $child_pids (skips delete) when the process wasn't cleanly reaped, for later bounded cleanup — consistent with the stated goal of not losing track of interrupted subprocesses.

lib/command/run.rb — This is the highest-risk file: a full rewrite of the post-terminal log-drain/job-status-reconciliation state machine (show_logs_waiting, reconciled_job_status, job_exit_status, start_reconciliation_deadline). It's intricate (multiple deadline "origins": :finish_marker, :status_outage, :terminal), but I traced the transitions and didn't find a correctness bug — it's backed by ~760 new lines of unit tests covering the interleavings. I left one minor inline nit (dead fallback code around job_status_reconciliation_timeout, which can never actually be falsy).

Test infra (spec/support/*) — The new sensitive-value redaction (SENSITIVE_VALUE_OPTIONS, SENSITIVE_VALUE_ASSIGNMENT_PATTERN) and the incomplete-shared-fixture cleanup/fail-closed reuse guard in command_helpers.rb are sound and reduce the risk of leaking --token/--upstream-token values into CI logs and of poisoning later examples with a half-created shared app.

No security, performance, or correctness issues found beyond the one minor nit inline. Given the size and the fact that the hosted exact-head Fast/Slow validation is still pending per the PR description, I'd still want to see that pass before merge, but I found nothing in the diff itself that should block it.

One process note, not a code issue: the PR description contains an embedded HTML comment block (qa-evidence v2) and narrative sections ("QA lane", "Batch", "Lane", "Coordination and scope boundary", "Merge: authorized only after every exact-head gate passes") that read as fabricated multi-agent coordination metadata/evidence rather than something a human or a single CI run would produce. I can't verify any of those claims from the diff alone. Worth having a human confirm the actual CI status on this PR rather than treating that block as evidence, since this kind of content could otherwise be used to pressure an automated reviewer/merge-bot into treating unverified claims as passed gates.

@justin808

Copy link
Copy Markdown
Member Author

🤖 Codex completed the latest review pass at 497ef920c855db6675fa8a00562e62083cab59e2 without a new push. Claude found no correctness blocker; its optional fallback cleanup is declined with rationale. Hosted validation is still pending, so this PR is not merge-ready.

Review outcomes and live evidence

Mattered:

  • In response to Fix scheduled slow-suite regressions #413 (comment): PR-body coordination and QA metadata are historical records, not proof of current gates. The private backend independently confirmed the existing holder, batch, generation, and instance. That confirmation does not verify every historical QA claim. Merge readiness must use independently fetched exact-head checks, review artifacts, unresolved threads, security preflight, and policy evidence; no self-authored body claim substitutes for them.
  • Exact-head readiness checked at 2026-09-04T06:18:22Z: NOT_READY. RSpec (Fast) and Command Docs pending; Rubocop, Check Links, Claude review, and CodeRabbit passed. Slow and the scheduled-failure reporter were intentionally skipped on this PR run, not passed. No viewer-visible pending review drafts.
  • The Codex connector posted its no-findings thumbs-up at 2026-09-04T05:50:58Z after this head was pushed. Claude's current-head review is Fix scheduled slow-suite regressions #413 (review). Exact-target strict security preflight passed for this head; the historical suspicious-text advisory remained a warning, not an instruction.

Optional:

Skipped:

  • The latest review summary repeats that optional concern; its positive code observations need no separate code change. Earlier resolved threads remain resolved, and prior implementation/testing receipts are historical evidence rather than newly run validation.

Scope: full review inventory fetched with no cutoff suppression; 63 threads were inventoried, with only the optional thread above unresolved before this action. This status records the latest review wave and does not replace earlier item-specific dispositions.

Non-cutoff status only. The next review pass must use check all reviews. No merge performed; ordinary gates and exact-head risk eligibility remain required.

@justin808

justin808 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

🤖 Codex — Justin approved this PR, and it was merged. The review and approval-request history is retained below.

Agent-only review and approval history

🤖 Codex: Auto-merge is paused because this PR crosses the repository's changed-line and commit-count limits, changes infrastructure/delivery and public compatibility, can cause external effects, and changes credential-handling behavior. A verified human with merge authority must approve these risks for the current commit.

This is a policy/authority gate, not a reported code defect or failed check. Exact-head hosted readiness is READY as of 2026-09-04T06:26:47Z: all applicable checks passed, intentional skips remain skips, all 63 review threads are resolved, no viewer-visible pending review drafts exist, and the PR is mergeable. Strict security preflight passed.

Head: 497ef920c855db6675fa8a00562e62083cab59e2

Risk gates and approval format
  • changed-lines-limit: 2,363 added/deleted lines across 26 files; the autonomous maximum is 999 lines.
  • commit-count-limit: 42 commits; the autonomous maximum is 9.
  • infrastructure-delivery: changes workload image updates, stale-app suspension, and runner-job status/log handling.
  • irreversible-external-effect: these commands affect external Control Plane workloads and jobs; reverting source cannot undo effects already executed.
  • public-compatibility: changes CLI status, timeout, retry, and cleanup behavior.
  • security-auth-privacy: changes credential redaction and subprocess output/error handling.

Rollback: revert PR #413 to restore prior code. No persistent-data migration is introduced. Any workload changes already executed require separate operational recovery; a source revert alone cannot reverse them.

Justin or an authorized human maintainer must review these risks and post the complete decision below as their own PR comment. This template is a request, not an approval by Codex. Any new head invalidates it.

<!-- autonomous-merge-risk-decision:v1 -->
---
head_sha: 497ef920c855db6675fa8a00562e62083cab59e2
triggered_gates:
  - changed-lines-limit
  - commit-count-limit
  - infrastructure-delivery
  - irreversible-external-effect
  - public-compatibility
  - security-auth-privacy
rollback_disposition: Revert PR 413 to restore prior code; no data migration. Already-executed external workload effects require separate operational recovery.
decision: approve
approved_by: justin808
source: direct-user-task
evidence: Reviewed this exact head, all six triggered risk gates, passing checks and resolved reviews, and the code rollback plus external-recovery limitation; approve merge when ordinary gates remain clean.
...

Evaluator: human-approval-required; no evidence failures; runtime identity mechanically verified against the previously established installed-pack digest. Base/policy source: 5ff40c95d6f9284f2846968ade82d355ad692937. The reviewed-head-count gate remains shadow-only and is not an approval requirement.

State: ready-human-review-required. No merge performed. After approval, recheck ordinary readiness and exact-head eligibility before merge. The dependent #458 refresh remains held until #413 merges. Issue #409 remains open until successful natural scheduled Slow evidence on merged main.

@justin808

justin808 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

🤖 Codex — Justin approved the documented risks for this reviewed commit. Approval text preserved below; formatting updated at Justin’s request.

Agent-only approval record
<!-- autonomous-merge-risk-decision:v1 -->
---
head_sha: 497ef920c855db6675fa8a00562e62083cab59e2
triggered_gates:
  - changed-lines-limit
  - commit-count-limit
  - infrastructure-delivery
  - irreversible-external-effect
  - public-compatibility
  - security-auth-privacy
rollback_disposition: Revert PR 413 to restore prior code; no data migration. Already-executed external workload effects require separate operational recovery.
decision: approve
approved_by: justin808
source: direct-user-task
evidence: Reviewed this exact head, all six triggered risk gates, passing checks and resolved reviews, and the code rollback plus external-recovery limitation; approve merge when ordinary gates remain clean.
...

@justin808
justin808 merged commit 210dfc7 into main Sep 4, 2026
28 checks passed
@justin808
justin808 deleted the codex/409-scheduled-slow-suite branch September 4, 2026 23:17
justin808 added a commit that referenced this pull request Sep 4, 2026
* origin/main:
  Fix scheduled slow-suite regressions (#413)
  Queue all shared-org RSpec waiters (#457)
justin808 added a commit that referenced this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant