4.7 KiB
Row 189: stack-release.sh activate --no-send
Gitea #1687. Vikunja P19 #413 (Q175 interim, #412). Brief: docs/plans/2026-10-20_activate-no-send.md.
Rulings: mos-0972 (the Console runs without --send until Q175 phase 2), mos-0973 (go; Sage builds,
Dewey reviews; gate is the cli suite plus every scripts/test-*.sh). Base: def2e7932 (refactor, the
brief commit on 9ae8c73ac).
What it does
activate ID BUSINESS --no-send drops --send from RUN_CONSOLE in a new send_for_target, which
console_for_target calls after proof_for_target. install_stack renders the unit from
RUN_CONSOLE and write_pointer writes the pointer from it, so both lose the flag and flags_drift
stays quiet afterwards. Only activate takes the flag; the parser sends every other op to usage
(exit 4).
check_target lets a --no-send activate name the pointer's copy only when the pointer's Console
flags hold --send. That run is a live-copy re-pin, the same path row 187 uses for the proof pair:
the plan prints the live-copy note, the run stops both units, backs up the stopped store and starts
them again. A plain same-copy activate, or a same-copy --no-send once --send is gone, still
refuses already-active.
--plan prints one send: line after the proof: line, for activate and rollback:
send: dropped; --no-send was givensend: off; --no-send was given and the pointer holds no --sendsend: carried(the pointer's--sendgoes on unchanged)send: off
The steps log gets drop --send; --no-send was given, or --no-send was given and the pointer holds no --send, so there is nothing to drop.
Rollback and pm-on carry the pointer's flags as they are, so once --no-send has run, nothing adds
--send back. There is no re-enable flag (mos-0973). Q175 phase 2 changes the Console flags in its
own row.
docs/TOOLS.md: [--no-send] in the usage block and one paragraph after the proof paragraph.
Tests (packages/cli/tests/stack-release.test.mjs, T55)
- Seeded preview pointer with
--send --tester-port 7333: a same-copyactivate B acme --no-sendpasses. The pointer and the unit ExecStart lack--sendand keep the other flags in order, status says the unit flags match, the steps log has the drop line, the log line has from = to = B and the backup sum equals the stopped store's, and the units stop and start in order. - Plain same-copy activate, with
--tester-portand with--no-proof, refusesalready-active. So does a same-copy--no-sendonce--sendis gone, and on a pointer that never held it. - The four
send:lines, the live-copy note on the same-copy plan only, and the Console line right aftersend:without--send. The run on a pointer with no--sendlogs the nothing-to-drop line and no drop line. - After
--no-sendon C1, a rollback to B leaves--sendout of the pointer and the unit, the steps log never names--send, and status matches. pm-on afteractivate --pm-after-harness --no-sendkeeps it off. --no-sendon rollback (with and without--plan), pm-on, status, adopt and rehearse is a usage error with the usage text, nothing written, started or logged. The usage text shows[--no-send].- A pointer holding both the proof pair and
--send: the plans for--no-proof,--no-sendand both name what each drops and carries.--no-sendkeeps the pair,--no-sendwith a new pair replaces it,--no-proofkeeps--send, and both together leave neither. Status matches after each.
planTail gains 'send: off' after 'proof: off', because every plan now prints the line. T36 takes
out.slice(-n) around planTail, so its four slice counts grow by one.
Mutants
mutants.sh in this packet, run on the candidate. Each mutates scripts/stack-release.sh and runs T55 plus T1 and T2.
- M1: the same-copy exception ignores
--no-send. - M2: the same-copy exception allows
--no-sendwithout--sendin the pointer. - M3: with
--no-send, the pointer is written fromP_CONSOLE, so it keeps--sendwhile the unit drops it. - M4: rollback re-adds
--send. - M5: the parser accepts
--no-sendfor rollback.
Results: mutants-run.log, all five killed (M1 5 failures, M2 2, M3 7, M4 2, M5 2).
Deviations from the brief
- The brief's line numbers were taken before row 163 landed. The candidate corrects them to the
9ae8c73aclines (check_target :249-256, flags_drift :646-657, console_for_target :664-693, adopt :828). - Test 5 also covers rehearse and
rollback --plan, which the brief did not list.
Outbound calls
None. The change edits an array before the existing unit render and pointer write. Every test uses
the stand-in systemctl, units, stores and data root the file already builds; no test touches
~/.mosaic-dev, the live units or a slot file.