Skip to content

[Automation] Align embedded OpenCode runtime prompt with no-early-stop commercial loop #154

Description

@seonghobae

Gap

The external hourly mightyETL commercial scheduler has been strengthened to be explicitly work-conserving: every completed action/defer decision returns to a live executable queue, waiting is local, branch-writer conflicts are branch-local, and termination requires a mandatory second fresh sweep proving no safe work remains or genuine invocation-budget exhaustion.

PR #121's embedded .github/workflows/hourly-opencode-maintenance.yml runtime PROMPT, at exact head 75265fae9fcf5faac6f8b9cab63247ac86f23dd4, already has useful RCA → remediation feasibility → execute → reverify → fallback behavior, but its work-selection text still centers on exactly one source-actionable PR or exactly one independent vertical slice and does not explicitly require a post-action return to the queue plus double exit sweep. That leaves a future instruction-path drift risk once #121 becomes protected runtime.

Why this is not being patched directly into #121 now

#143#148 are repaired exact-predecessor stack items rooted on the unchanged #121 head. Advancing #121 solely to strengthen prompt wording would invalidate that exact predecessor boundary and force another non-destructive replacement/revalidation cascade through the durable-job stack. That ancestry churn has no independent product value while the external scheduler already enforces the stronger behavior today.

Therefore this issue is defer_until_trigger, not forgotten work.

Trigger

Execute immediately after either:

  1. ci: schedule NVIDIA OpenCode maintenance agent #121 integrates into protected develop; or
  2. a separate unavoidable ci: schedule NVIDIA OpenCode maintenance agent #121 source defect already requires advancing its head, in which case fold this test-first prompt alignment into that same necessary head movement before rebuilding downstream ancestry.

Do not modify #121 only to retrigger reviewers/checks.

Required runtime contract

The embedded OpenCode prompt/tests must explicitly require:

  • action completion is intermediate state, not an invocation endpoint;
  • after every remediation, commit, documentation update, test result, deferred blocker, or completed slice, return to the highest-value safe executable queue;
  • one remote candidate publication limit constrains mutation output, not read-only diagnosis/testing/documentation analysis after a candidate is prepared;
  • queued checks/reviews/provider waits are local deferred items, not reasons to idle;
  • same-branch writer movement freezes that branch, not the whole repository;
  • mandatory final fresh sweep of PRs/issues/checks/reviews/security/stack/docs/release/product gaps;
  • perform another safe action and sweep again if any executable item exists;
  • terminate only on genuine finite run-budget exhaustion or a second fresh sweep proving no remaining safe action;
  • routine status narration is not work.

TDD

  • first add/modify workflow contract tests that fail on the current ci: schedule NVIDIA OpenCode maintenance agent #121 prompt because the post-action requeue/double-exit language is absent;
  • run the focused RED on the exact branch ancestry;
  • change only the runtime prompt/authoritative agent guidance required for GREEN;
  • preserve the current one-candidate deterministic publisher safety boundary unless a separate reviewed ADR intentionally changes it;
  • rerun focused + full Maven tests and exact coverage;
  • update doctoring/AGENTS/CLAUDE/CHANGELOG/ADR if the governing automation contract changes;
  • regenerate all exact-head checks/reviews because old ci: schedule NVIDIA OpenCode maintenance agent #121 evidence does not transfer after any head movement.

Stack safety

If this is executed after #121 merges, start a fresh direct-develop PR and do not attach it beneath an obsolete pre-merge stack branch. If executed because #121 itself must move before merge, repair downstream exact ancestry non-destructively in dependency order and state explicitly that old checks/reviews/approvals do not transfer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenancearea: securitySecurity boundary, hardening, or vulnerability preventionmaintenancepriority: mediumNormal-priority or P2 workscope: commercial-readinessProduction, enterprise, release, or commercial readinessstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions