refactor: simplify the launcher without changing behavior #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/simplify-launcher"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A review of the launcher found the same logic copied in several places
and two functions over a hundred lines long, so a fix to one copy could
miss the others. This change reshapes that code without changing what
it does.
What changed
_azk_split_mount, parses mount values; it replaces fivehand-written copies.
_azk_canonicalize_existing_pathresolves the final parent folder inone place.
array.
_azk_maincalls named steps for the unknown-AZKABAN_*warning andthe container env lines.
pending copy is removed on one path.
lib/azk-host.shnames the engine (azk_host_engine_name), and theinstaller checks both engines' versions with one function.
_azk_check_state_dirsand_azk_create_state_dirs, documented indocs/adding-a-client.md.These add to the adapter contract without breaking it.
Behavior, error messages,
--dry-runoutput and the adapter contractare unchanged.
How to verify
Run
make lint && .agents/hooks/shellcheck.sh repo && make test: itpasses, with 41 files ShellCheck-clean and 328 tests, 0 failures. No
existing test was changed. The first commit only adds assertions that
an approval leaves just the approval record; they pass on
master.Each commit passes lint and the tests. Not run:
make test-e2eandthe macOS paths.
Considerations
One race-only difference in Claude's state setup: if
configchangesin the instant after
mkdir -p, the launch now stops with "Claudestate path '…/config' is not a directory", naming
config. Before, itfailed when writing
settings.json, or named the state folder. Eitherway the launch stops safely.