Skip to content

Phase 6a: manual runner port + Kotlin-port template - #59

Closed
grubmeshi wants to merge 2 commits into
refactor/single-go-binary/phase-5-dispatcherfrom
refactor/single-go-binary/phase-6a-manual
Closed

Phase 6a: manual runner port + Kotlin-port template#59
grubmeshi wants to merge 2 commits into
refactor/single-go-binary/phase-5-dispatcherfrom
refactor/single-go-binary/phase-6a-manual

Conversation

@grubmeshi

Copy link
Copy Markdown
Collaborator

Phase 6a — manual runner port + Kotlin-port template

First of the four stacked Kotlin→Go port PRs (manual → gitlab → azdevops → github). Base: phase-5-dispatcher.

Ports the manual runner to Go and establishes the shared Kotlin-port template the 06B–D ports inherit:

  • internal/meshapi/sourceupdate.go — lean third PATCH shape (SourceUpdateDTO/StepUpdateDTO, §7.4)
  • internal/report/eventreporter.go — event-driven, stateless, ticker-less, abort-discarding report.Reporter impl (RunPatcher + NewReporter)
  • internal/config/{singlerun,blockrunner,privatekey}.goSingleRunMode, BlockRunnerCompat.ApplyShared, ResolvePrivateKey
  • internal/dispatch/portclassifier.goStandaloneClaimClassifier
  • internal/manual/* — the persona (echo + debug handler), cmd/manual + cmd/bbrunner manual wiring, container.

New gated package internal/manual at 97.6% (gate 90). Build, go test -race ./..., golangci-lint (0 issues), and the coverage gate all pass.

Sanctioned deltas / deferrals

  • Kotlin module NOT removed, CI NOT flipped, meshfed-release SKILL NOT edited — these hinge on the §11 acceptance gate (live meshStack + k8s single-run smoke) not runnable here; landed additively so siblings can stack. Captured in CROSS_REPO_TODO.md.
  • Kotlin pin tests (§3) not authored (gradle not runnable); the Go scenario suite is the surviving pin.
  • ExternalCallError deliberately NOT created here — ships with its first consumer (06B), no dead type (§4.4).
  • Standalone-loop claim node-id is manual-block-runner-<uuid> (existing prefix format) rather than plain uuid, to avoid editing shared dispatch.

🤖 Generated with Claude Code

grubmeshi and others added 2 commits July 10, 2026 19:10
Brings PLAN_DETAIL_06_kotlin_ports_umbrella.md and its 06A (manual) sub-plan
onto this branch (both previously only existed on refactor/single-go-binary/
plan) and runs every umbrella A1-A12 verification step against the
phase-5-dispatcher tree.

A3 (registration: config section + opt-in startup PUT), A4 (shared
meshapi.DecryptRunDetails) and A7 (runner_runs_unhandled_total /
runner_at_capacity_skips_total metrics) are plan-05 promises that never
landed - A4 is the same root cause phase-5's own STOP-gate already flagged
(A5), carried forward unremediated; A3/A7 are fresh instances of the same
"promised, not delivered" pattern against different plan-05 commitments. A2
partially fails the same way (no maxConcurrentRuns/RUNNER_MAX_CONCURRENT_RUNS
persona knob yet). A9's literal fixture-cross-decryption step is unexecutable
(the cited Kotlin test mocks decrypt() rather than embedding a raw
ciphertext); substituted with a direct algorithm-level code comparison,
which holds. A10/A11 fail their literal empty-diff/proof-string check only
via unrelated, already-sanctioned changes elsewhere in the same file/doc.

Resolved autonomously without halting: none of the gaps block 06A (manual
decrypts nothing, and its own steps 5/7 already anticipate originating the
registration section, the maxConcurrentRuns knob and the two metrics fresh)
so the umbrella and 06A plan text stand unrevised; each gap is recorded so
06A/06B onward do not silently assume machinery that does not exist yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mplate

Ports PLAN_DETAIL_06A_manual.md and establishes the phase-6 template artifacts the
gitlab/azdevops/github ports inherit (umbrella §6). Additive and always-green: the
Kotlin manual-block-runner module and its Gradle/CI legs are untouched (removal + the
acceptance gate + the meshfed-release SKILL edit are deferred to the flip PR, see
CROSS_REPO_TODO.md — they need a live meshStack this environment can't provide).

Template artifacts (reused verbatim by 06B–D):
- Wire seam: meshapi.SourceUpdateDTO/StepUpdateDTO (the lean third PATCH shape, §7.4)
  + report.NewReporter — the event-driven, stateless, ticker-less, abort-discarding
  implementation of the ONE unified report.Reporter port (umbrella §7.5).
- Config compat: config.SingleRunMode (EXECUTION_MODE or SPRING_PROFILES_ACTIVE=
  kubernetes, §6.3), config.BlockRunnerCompat + ApplyShared (blockrunner: yaml
  normalization, §6.4), config.ResolvePrivateKey (Kotlin PrivateKeyLoader order, §6.5).
- dispatch.StandaloneClaimClassifier (404→no-run, else→logged-no-run, no backoff, §7.1).
- Per-persona Dockerfile + runner-config.yml layout; depguard group; thresholds line.

Manual persona (internal/manual, cmd/manual, bbrunner manual subcommand):
- Handler echoes inputs→outputs 1:1 (toOutputType table, last-wins, number fidelity via
  UseNumber), debug mode (config-selected, injected Clock/Rand), no decryptor (§4.1).
- Polling (dispatch.Loop + InProcess, mgmt on 8104, PORT alias) and single-run (file
  source, runToken-only reporting, R12 exit rule — §7.9 exit-code tightening over the
  Kotlin swallow).

External-API error type (ExternalCallError): per §4.4 the shape is specified in the plan
and ships with its first consumer in 06B — no dead type in 06A (P3). Choice recorded.

Coverage gate: internal/manual joins thresholds.txt at 90 (measures 97.6%, no exclusions).
STOP-D fit review (§17) re-affirmed: RunHandler/ClaimedRun/reporter shapes fit all three
remaining runners — no plan-05/umbrella revision needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@grubmeshi

Copy link
Copy Markdown
Collaborator Author

Superseded by #65, which consolidates the plan + all phases 0→7 + the phase-3/5 remediation into a single reviewable PR (with all plan/run artifacts and a code-verified FOLLOW_UP.md). Closing in favor of #65.

@grubmeshi grubmeshi closed this Jul 13, 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