Skip to content

Refactor LastCode delivery around resumable CI and artifact waits #103

Closed

Description

@lastobelus

Goal

Make LastCode delivery use a small coherent set of independent resumable Project Actions so agents do not spend turns polling passive validation, review, or artifact builds. Move comprehensive PR validation back to GitHub CI while keeping a genuinely quick local pre-push gate and preserving exact-revision guarded merge safety.

This supersedes the architecture recorded by #87 without rewriting that closed historical issue.

Measured wait burden

Candidate Occurrences/PR Polls/occurrence Polls/PR
Current heavyweight Quick CI 3.3–4.75 17–18 59–87
Local Full CI 1.25 19 23.8
Codex review and PR-state wait 3.0–3.4 5.2 15.5–17.6
Intel artifact workflow 0.25 25 6.25

Base/head drift remains an agent wake point rather than its own action. Guarded merge and push transport remain below the three-polls-per-PR threshold.

Intended steady state

  • Wait for PR waits concurrently for authoritative exact-revision GitHub CI, exact-head Codex review, unresolved threads, mergeability, and head/base drift.
  • Build Intel package dispatches and waits for one exact-tag hosted Intel artifact build, but never installs or promotes it.
  • Quick CI becomes an action only if the trimmed gate still costs at least three polling turns per PR; otherwise it remains synchronous.
  • Run Full CI is retired from ordinary PR delivery after GitHub CI becomes authoritative, while checkpoint/installable Full CI remains intact.
  • Findings, fixes, focused tests, rebases, retries, pushes, installation, promotion, and merge readiness remain agent decisions.

An empty GitHub check rollup is never interpreted by itself. Disabled/not-required CI means no hosted gate; enabled applicable ci.yml means an exact-revision run is expected. The waiter and guarded merge share one tested CI-evidence model bound to the current PR head, base, and synthetic merge SHA.

Delivery slices

1. Establish and prove hosted CI waiting

  • Fix the feat(lastcode): collapse resumable action output #97 zero-check deadlock with deterministic workflow expectation.
  • Adapt the existing ci.yml to standard GitHub runners, correct triggers and permissions, and add one stable aggregate gate over the existing parallel job graph.
  • Retain local Full CI and its merge stamp during proof.
  • Enable the existing workflow only with explicit authorization, dogfood on the implementation PR, and measure real jobs and timings.

2. Trim and measure Quick CI

  • Keep git diff --check, formatting/lint, and typechecking only if acceptably fast.
  • Leave focused tests to the implementing agent.
  • Add an exact Quick receipt/action only if remeasurement remains at least three polls/PR.

3. Cut merge authority over to GitHub

  • Require successful exact workflow/merge-SHA evidence in guarded merge.
  • Prove checkpoint-promotion ruleset behavior before requiring the aggregate context.
  • Retire the ordinary-PR Full CI action and stamp.
  • Update LastCode skills/docs and the canonical babysit skill in agent-contexts.

4. Add the Intel artifact action

  • Correlate each dispatch uniquely to one workflow run.
  • Wait resumably for success or a terminal problem.
  • Keep staging, installation, and promotion separate.

Constraints

  • Independent resumable actions; no automatic chaining.
  • Deterministic state decisions; no model classifier.
  • No setup automation, installers, migrations, repair systems, compatibility layers, or support for old LastCode versions.
  • No added complexity for one-time Project Action configuration.
  • Focused tests and dogfooding on each delivery PR.
  • Preserve checkpoint/installable safeguards throughout the PR-CI transition.

Done when

  • the steady-state Project Actions and canonical babysit skill describe one understandable loop;
  • GitHub CI and guarded merge agree on exact authoritative evidence;
  • Quick CI has measured bounded coverage and no duplicate pre-push wait;
  • Intel builds no longer consume agent polling turns;
  • all implementation PRs are babysat and guarded-merged; and
  • both project trackers are reconciled.

Activity

  1. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Slice 4 (Build Intel package) is now running independently in the Intel-build coordination thread. It owns the exact-tag dispatch and wait action and will dogfood it by producing the eligible 1185.3 Intel release after the implementation lands. Installation or promotion on an Intel artifact-consumer node remains a separate decision. Slice 1 continues independently on lastcode/github-ci-waiting.

  2. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Slice 1 merged in PR #104 (d3ae5d24eafc9a09db6759088c651d948d1a0222).

    Dogfood evidence:

    • Disabled/non-required hosted CI no longer deadlocks an empty check list; Wait for PR treated it as not expected and resumed on the actionable Codex finding.
    • After enabling CI, the first live run exposed and drove fixes for workflow-run SHA semantics, volatile synthetic merge SHAs, the legacy PR-asset guard, and Linux portability of LaunchAgent tests.
    • Green hosted runs on standard runners completed in about 4m46s and 4m31s. Both CI and Codex review waits used the resumable action with zero agent polling turns.
    • A real base drift invalidated the first green result; the agent chose to rebase, and the action handled the resulting CI/review reruns independently.
    • Final Full CI passed for exact head bf1fa30f79bb43b14dc73aa76e995962d0a85427 and base 02e5b65116ce8792f07805ef039bd7a494a7240e; guarded merge succeeded.

    The CI workflow remains enabled, but CI Gate is not yet made a required ruleset context and the local Full CI stamp remains authoritative during the staged cutover. Issue #103 and both project items remain In Progress for the Build Intel package, Quick CI measurement/action decision, canonical skill update, and final authority cutover slices.

    Post-merge note: guarded merge could not kick the unloaded nightly checkpoint LaunchAgent on this machine; the merge itself completed and is present at origin/lastcode/main.

  3. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Build Intel package slice delivered and dogfooded successfully.

    The action produced the x64 DMG and ZIP, blockmaps, SHA256SUMS, build manifest, and updater metadata. It did not stage, install, promote, restart, or update an Intel artifact-consumer node.

  4. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Quick CI slice implementation is committed on lastcode/trim-quick-ci at 8912b6e2d and is ready for self-dogfood before publication.

    Measurement and threshold decision:

    • trimmed gate: exact branch-diff whitespace, repository format/lint, workspace typecheck;
    • cold run: 45.31s;
    • confirmation run: 56.77s wall time, including a one-time 13.1s package prepare; gate stages remained about 43–44s;
    • observed agent polling cadence: about 31.5s;
    • projected burden: about 4.6 polls/ordinary PR and 6.6 polls/complex PR, above the agreed 3 polls/PR cutoff.

    Therefore Quick CI is an independent resumable Project Action. Success writes a receipt bound to the exact head, current local origin/lastcode/main, and gate version. The action never pushes. The pre-push hook accepts only a matching receipt for pushed refs at exact HEAD; otherwise ordinary command-line pushes run the same gate synchronously. Dirty trees, head/base changes, gate changes, and validation failures cannot produce or reuse a receipt; a transport retry of the same exact commit can.

    Focused validation currently passes: 21 tests across the local-CI and build-progress suites, dry-run plan rendering, formatting, and git diff --check. The current saved project still needs the newly checked-in Run Quick CI action imported and enabled for agent resume once so this same PR can dogfood the resumable path.

  5. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor
    lastcode_claim:
      schema: 1
      work_id: "lastobelus/lastCode#103"
      agent: "Codex"
      agent_id: "t3code-fb2ce5f3"
      model: "gpt-5.6-sol"
      provider: "openai"
      host_role: "lastcode-gui-node"
      claimed_at: "2026-08-27T19:54:20Z"
      status: "completed"
      phase: "completed"
      summary: "PR #112 merged through the guarded LastCode workflow; it imports pinned upstream PR #7961 and includes the round-1 canonical-command fixes."
      touch_points:
        - "packages/contracts/src/keybindings.ts"
        - "packages/contracts/src/keybindings.test.ts"
        - "apps/web/src/projectScripts.test.ts"
        - "apps/web/src/lib/projectScriptKeybindings.test.ts"
      done_when:
        - "Pinned upstream head 6be823df41b105ddee33677f0b72aa4f5ad1c868 applies with provenance preserved"
        - "The exact 25-character saved action ID round-trips without throwing while empty and whitespace-padded command IDs remain rejected"
        - "Focused tests, contracts/web typechecks, formatting, lint, static diff checks, and matched browser fixture pass under Node 24"
        - "The patched LastCode client opens the existing saved state without the renderer error boundary"
        - "PR #112 reaches exact-head green CI and completed review, then merges through the guarded LastCode workflow"
      excludes:
        - "Changing or migrating persisted project-script data"
        - "Renaming the existing Build Intel package action"
        - "Broader keybinding or project-script redesign"
      branch: "port/upstream/pr-7961-tolerate-project-script-ids"
      pr: "https://github.com/lastobelus/lastCode/pull/112"
      handoff: "Reviewed head 935b8f90c276ee8ed9db527d3475620b12db94cb merged as e89a22879d8c8eca7d14f31955274377b247768b; GitHub CI run 33115946592 and exact-head Codex review passed with zero unresolved threads."
      updated_at: "2026-08-27T21:16:30Z"
  6. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Quick CI slice merged in #110 as 6416a0114b9e03b61d4c76139a3e9eeff4a61c2c; the squash-merge tree exactly matches reviewed head 190590fed33105588fc36549e45ca3e226b8f776.

    Measured/design result:

    • trimmed Quick CI (exact workstream diff whitespace, format/lint, workspace typecheck) takes about 43–45s after package preparation;
    • at the observed 3.3–4.75 occurrences/PR and ~31.5s polling cadence, projected burden is about 4.6 polls/ordinary PR and 6.6 polls/complex PR, above the 3 polls/PR threshold;
    • Run Quick CI is therefore an independent resumable action that writes a receipt bound to exact head, selected workstream base ref+commit, and gate version; it never pushes;
    • the hook reused each exact receipt in roughly 2.9–3.3s across four fix pushes instead of rerunning the gate.

    Dogfood/review evidence:

    • exact Quick command and receipt-to-hook boundary passed on every published head;
    • GitHub CI and Codex review waits used Wait for PR with zero agent polling turns;
    • four review rounds found and fixed tag/deletion handling, upstream workstream selection, mirror-command bypass documentation, and the one-time Action import/opt-in instructions;
    • final exact-head GitHub CI Gate passed in run 33110547937, Codex reported no major issues, and unresolved review threads were zero;
    • transitional Full CI passed through Run Full CI for exact head 190590fed and base 953b281a4; guarded merge succeeded.

    The current checkout had not imported the new Action during its own PR, so its long command was launched as one uninterrupted operation rather than through agent-triggered resume. The merged docs now explicitly require the deliberate one-time per-checkout import from t3.json and Allow Codex and Claude to run and resume opt-in. No setup automation or migration was added.

    The post-merge checkpoint LaunchAgent kick failed because the service is unloaded on this machine; the merge itself is verified on origin/lastcode/main. Issue #103 and its project items remain In Progress for final GitHub merge-authority cutover, ordinary-PR Full CI retirement, and the canonical agent-context babysit skill update.

  7. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Slice 3 cutover is published as #111 at exact head 6944da9bd2b096fe01834683ffb0743c8c7b5bac.

    Implemented:

    • guarded merge now consumes the shared exact GitHub CI evaluator, refetches the base, and rereads clean PR state before merge
    • ordinary Run Full CI Project Action and PR stamp guidance removed
    • checkpoint/release Full CI stamps retained
    • LastCode-only and upstream-import delivery skills aligned
    • repository ruleset now strictly requires CI Gate and grants an always-on bypass only to owner lastobelus (user ID 25810) for checkpoint promotion

    Focused validation: 41 tests, focused lint, scripts typecheck, skill validation, exact Quick CI receipt and hook reuse. GitHub CI and exact-head Codex review are now running on #111.

  8. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    PR #111 merged as eaf8e0befbb0de930e615110258644e94cc1e1e9; its merged tree exactly matches reviewed head 6944da9bd2b096fe01834683ffb0743c8c7b5bac. The new guard dogfooded exact GitHub CI run 33112905801 and tested merge c58f412871076a7e2484a31a1bdb332e681fe61c. The checkpoint LaunchAgent kick failed because the service is unloaded; merge remained successful.

    Canonical skill follow-up: agent-contexts issue #7 and PR #8 at 233a5ff7a4f11f3625791fd4e6754fa773514aa0. Skill validation passed and exact-head Codex review is requested.

  9. lastobelus commented on Aug 27, 2026

    @lastobelus
    OwnerAuthor

    Canonical agent-contexts PR #8 merged as 709c96dab717ea76419783ffddb2d2a82af177ca; its merged tree exactly matches reviewed head 24b430e6d143b72f0aadb34c4585bb0a6cc0e55c. Codex was clean after one real sequencing finding was fixed and its thread resolved.

    Runtime rollout is complete across the managed LastCode GUI/controller and server roles:

    • each managed agent-contexts checkout is on clean main at 709c96d
    • canonical babysit skill SHA-256: 6add2509e8393edb3e94af36b560087505129aaaa27114974b0fede688cb795a

    The complete resumable babysit workflow is now landed.

  10. 233 remaining items

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions