Skip to content

refactor(module): Sidecar to phase-invocation layer + archetypes emit all 10 (deepening #2+#4)#256

Merged
ycpss91255 merged 3 commits into
mainfrom
feat/module-system-deepening
Jun 21, 2026
Merged

refactor(module): Sidecar to phase-invocation layer + archetypes emit all 10 (deepening #2+#4)#256
ycpss91255 merged 3 commits into
mainfrom
feat/module-system-deepening

Conversation

@ycpss91255

Copy link
Copy Markdown
Owner

Summary

Combined architecture deepening #2 + #4 (grilling-locked).

  • ci: add GitHub Actions workflow (test-unit / test-integration / lint / coverage) #2 Sidecar to the phase-invocation layer: one _module_sidecar_after_phase
    helper, called from lib/runner.sh (engine) and module_standalone_main
    (standalone) -- covers all 39 modules incl. hand-written archetype-D, both
    modes. New module_provided_version() (apt dpkg / github-release resolved tag,
    preserved on idempotent re-install / config+D VERSION_PROVIDED). Removed
    sidecar calls from 29 modules and 15 _xxx_pkg_version helpers (now 0).
  • ci: add GitHub Actions workflow (test-unit / test-integration / lint / coverage) #4 archetypes emit all 10: macros now wire is_outdated + a read-only
    doctor; redundant stubs removed, real overrides kept. detect /
    is_recommended stay module-defined.
  • Tests rewired through the invoker; invariant is_installed==false <-> Sidecar absent preserved at the invoker layer. New lib tests (module_helper_spec,
    runner_spec). ADR-0027 added (refines ADR-0001 + ADR-0002).
  • Caught a real bug: github-release idempotent re-install now preserves the
    Sidecar instead of clobbering it (integration AC-5/6).

Test plan

  • lint 0; test-unit 4033/0; test-integration 22/0 (real engine lifecycle).
  • coverage 80.03% via the CI sharded-merge path (exit codes checked, no
    truncated-tail false green; the agent caught and fixed an earlier one).
  • CI re-runs the full gate.

Risk: coverage margin is thin (80.03%). A pre-existing kcov instability on the
fzf shard (its bats exits 1 under ptrace after all tests pass, same on unmodified
HEAD) can drop the merge to 79.54% if that shard truncates; CI on main records it
cleanly (~80.2-80.8%). If the coverage job flakes on fzf, a rerun fixes it.

Deepening #2+#4 -- the last NOW-batch piece. .agents/memory untouched.

Generated with Claude Code.

…emit all 10 (deepening #2+#4)

#2: the Sidecar write/remove invariant moves out of every module into one shared
_module_sidecar_after_phase helper, called from BOTH invokers (lib/runner.sh
_runner_run_phase for engine, module_standalone_main for standalone) -- so all 39
modules + both modes are covered. New standardized module_provided_version()
(apt: dpkg of APT_PKGS[0]; github-release: resolved tag, preserved on idempotent
re-install; config/D: VERSION_PROVIDED, overridable). Removed the sidecar calls
from all 29 modules and the 15 per-module _xxx_pkg_version helpers.

#4: module_use_{apt,github_release,config}_archetype now emit all 10 lifecycle
functions (default is_outdated + a read-only doctor); redundant hand-written
stubs removed, genuine overrides kept. detect + is_recommended stay
module-defined.

Tests rewired: sidecar-after-install assertions now route through the invoker
(module_standalone_main); the is_installed==false <-> Sidecar-absent invariant is
preserved at the invoker layer. Adds lib-level tests (module_helper_spec,
runner_spec). ADR-0027 records the move (refines ADR-0001 on WHERE + ADR-0002 on
the 10-fn macro contract).

Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@ycpss91255 ycpss91255 enabled auto-merge (squash) June 21, 2026 22:59
ycpss91255 and others added 2 commits June 22, 2026 07:43
… keeps its skip

The sweep moved lazydocker's "remove is a no-op when not installed" skip into the
SHARED module_default_github_release_remove, which broke fzf (its remove must
clean a Sidecar-less partial install). Resolution mirrors main: the shared
github-release remove default no longer gates on is_installed (rm -rf / rm -f are
idempotent and must clean a partial install), and lazydocker keeps its own
remove() override with the skip (dryrun_guard -> skip-if-not-installed ->
default), minus the Sidecar line (the phase-invocation wrapper handles it).
Verified: fzf + lazydocker specs green in Docker.

Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@ycpss91255 ycpss91255 merged commit 82bc978 into main Jun 21, 2026
53 checks passed
@ycpss91255 ycpss91255 mentioned this pull request Jun 23, 2026
3 tasks
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