--- name: mc-converge-v17 description: "The session's procedure at each decision point the judgment module answers in a CANONQ-NATIVE v1.7 Mission (SPEC-MC173-001 AC-11, AC-15, AC-22; ARCH-MC173-001 D1; IP-MC173-006): the call before each heavy run of a wave run by hand, the call before an agent start, the call at a review that blocks and at a red integration stage, the deciding entry at every other point, and the steps of the blind test at a stop: the rendering the Business Owner reads, his blind decision in his own words, the reveal once the stage has ended, and his reading of each disagreement. Triggers on \"decision point\", \"heavy run\", \"blind set\", \"blind stop\", \"mc-converge-v17\", \"converge evaluate\". Arguments: none; the wave's Manifest and ledger come from the checkout's lock." --- # mc-converge-v17 Read this file to the end before acting. The judgment module answers at seven kinds of decision point, and this skill says what the session does at each: which command it runs, what it reads, and what it leaves to the Business Owner. `mc17` is the launcher `client/mc17` two levels above this skill's folder, from a POSIX shell, Git Bash included, and `client/mc17.cmd` from PowerShell or cmd. Every record the commands below write names its writer in `recordedBy`, and a ruling of the Business Owner carries his words in `authorityWords` and his speaker line in its body. ``` mc-converge-v17 v0.1.0 (MC 1.7 - CanonQ-native) Parameters: none (the wave's Manifest and ledger are read from the checkout's lock, or from the store's registry of checkouts) Returns: one record per decision point on the Mission's ledger, and the lines each command prints ``` ## What the session does, step by step 1. **after the release installs, the session of Mission MC17.3 starts the blind set once**, with `mc17 converge blind --open --scope MC173`, on the store's home host, after `mc17 converge key --init --scope MC173` has made the key pair; a Mission that runs no blind test runs no such command, and a second opening is refused. 2. **in a wave run by hand, before each heavy run**, call `mc17 converge evaluate --point heavy-run --bash "{the exact command}" --manifest {the Manifest} --ledger {the ledger}` as a command of its own, read the proposal it prints, and run the command as written; the call writes one start entry per heavy run, the hook `hooks/lint-heavy.py` admits the run on that entry and writes the session's deciding entry as the run starts, and the next command sends that entry to the ledger, so the session runs no `mc17 converge decide` here; the hook refuses a heavy run that no start entry admits, and names this command; in a remote checkout that the lock registers with `--remote {ssh target}:{path}`, start each heavy run as `ssh {target} "cd {path} && {the exact command}"`, or with the cd inside `zsh -lc '...'`, and hand the call that whole line: the hook reads the remote cd and judges the start under the key of the target. Start each heavy run as the call's own command line, never from inside a script file: the hook reads the command line alone, so a stage started from a script runs unseen and leaves its start entry unused; a stage of a second host runs from a checkout the lock registers with `--remote`, started with the `ssh` line above. 3. **before each agent start**, write the prompt to a file, call the command with `--agent-prompt {file} --workdir {the agent's folder}`, and start the agent with the prompt as the file holds it, since the hook matches an agent by the digest of its prompt; on a host where the hooks see an agent's own commands (Windows, by note record 339), put the step of 2 into the prompt, with the wave's Manifest and ledger. An entry made for an agent the session then does not start stays open until the session ends it with `mc17 converge ended {entry} --ledger {the ledger}`. In a wave whose Wave Plan's row `wave.prompts` reads `template`, the prompt file is the file `{brief}.start` that `mc17 wave prompts --start {IP id} --role {build | review | fix | rereview} [--lens {name}] --plan {the ruled Wave Plan} [--facts {file}] --out {brief}` writes beside the agent's brief: it holds one line and one newline after it, and the prompt is the file's whole text, its last newline included. Pass `--workdir` for every start, so that the hook places the start in the wave and reads its brief; the hook refuses a brief that is no start text of the lock, and the brief's rules already carry the step of 2. A message to a running agent states a fact of the start, quotes a rule of its brief, or tells it to stop. Any other message is a correction: record it first as a ledger note that opens `PROMPT CORRECTION {Wave Plan id} {IP id} {role}`, and name that note on the message's first line. 4. **report each end the hook does not mark** with `mc17 converge ended {entry} --ledger {the ledger}`: a command run in the background, an agent whose id never reached the hook, and every end on a host whose hooks report none; the next packet's running work then reads true again. A stage start entry that no start used ends only with `--stage-dir {the run's directory}`, which reads the run's `stage.json` and marks the entry used by that run, or with `--no-run --ledger {ledger_asset_id}` where no stage ran under it, which the command reads against the ledger's integration records. 5. **when a review blocks**, write the lenses' results in the runner's form, each finding's words copied as written, and call the command with `--review {file} --repo {the checkout}`; a lens blocks by the runner's own rule: a verdict of the blocking list, a verdict in neither list, no verdict at all, or a clearing verdict with a finding graded `MEDIUM`, `HIGH` or `CRITICAL`, or with a grade in neither severity list; a review in which no lens blocks is refused before any call. 6. **when an integration stage reads red**, run the command its last line names, `mc17 converge evaluate --point red-stage --stage-dir {the run's directory} --manifest {the Manifest} --ledger {the ledger} --wave {the Wave Plan}`, after copying a run of the other host to the home host; right after the decision, act on each line `Run going : {table id} on {host}, keep` or `..., stop`: on a stop, end the run, and where it has a start entry, report the end with `mc17 converge ended {entry} --ledger {the ledger}`. Where that last line also names the landing route of a false red, offer the authority that route first, before any rerun: name each red check, its host and its cause as its output shows it, and the ruling he would type, which states each red check and its cause; the acceptance record then cites the run at the pull request's tip whose tree equals the merge's, and states each check on each host in its own words. Offer a rerun second, with its hours as the run's own figures give them, and at a stop of the blind set offer the route only after his blind decision of step 7. 7. **at a stop of the blind set**, the session renders the stop with `mc17 converge render {stop id} --ledger {the ledger}` and shows the Business Owner the text as it stands, from the store's `shown/`. It gives no advice and no word of its own on what to do. It offers the seven names (`accept`, `targeted-correction`, `gather-evidence`, `change-strategy`, `challenge-threshold`, `defer-improvement`, `escalate-or-stop`) and records his choice in his words, with `mc17 converge decide {stop id} --as BO --action {name} --words-file {his words} --speaker "{his speaker line}" --ledger {the ledger}`. It opens nothing under the store's `sealed/`. It asks him for no other ruling on the stop before his blind decision, and it names the stop's id in any ruling he gives at it. At a red stage, right after the decision, act on each line `Run going : {table id} on {host}, keep` or `..., stop`: on a stop, end the run, and where it has a start entry, report the end with `mc17 converge ended {entry} --ledger {the ledger}`. 8. **once the stage has ended**, reveal it with `mc17 converge reveal {Wave Plan id}/{IP id} --ledger {the ledger}` (`{Wave Plan id}/integration` for the integration stage), read each `Matches:` line, and ask his reading of each disagreement, recorded with `mc17 converge reading {stop id} --verdict {module | his | both | neither} --module-harm {word} --his-harm {word} --words-file {his words} --speaker "{his speaker line}" --ledger {the ledger}`, each harm word one of `harm`, `waste`, `no harm recorded` and `unknown`. A stop he took out of the set by name after it was sealed is revealed as soon as his ruling stands, before its stage ends, with `mc17 converge reveal {stop id} --ledger {the ledger}`; a stop still in the set is refused. Once a stop is revealed and either his reading stands or his blind decision agreed with the module, so that no reading is owed, and after an authority's own deciding entry of step 9, write the judged case into the checkout's file with `mc17 converge cases --add {operation id} --ledger {the ledger} --file {the judged-cases file of the engine's checkout, which the engine plan keeps under engine/core/}`, on the branch of the next wave, so it ships with that release. 9. **at every other decision point**, record the deciding entry with `mc17 converge decide {operation id} --as {BO | TO | session} --action {name} --ledger {the ledger}`: the session's own as `--as session`, an authority's with `--words-file`, `--speaker` and the `--shown` of step 13; the same at a heavy-run start whose run the session does not make, since the hook writes a deciding entry only where the run starts. 10. **the measured runs** keep the order `runOrder` of `IP-MC173-005` holds, published, replay and judgment one after another, each a heavy run of its own, one at a time, through the step of 2. 11. **before the Move acceptance**, reconcile each ruled reading with `mc17 readings --manifest {the Manifest} --ledger {the ledger} --check`, as D1 lists the step. 12. **when the corpus refuses a decision record**, report the refusal as a defect of the plugin to the Technical Owner (D-8): the program composed the record, and the command prints `REFUSED BY THE LEDGER` with the corpus's reason. 13. **at a stop, before a decision is asked of an authority, run the offer**, `mc17 converge offer {operation id} --ledger {the ledger} [--runner-return {file}] [--repo {the checkout}]`, and hand him what it prints: the ruling he would type, the reading sentence, or the decision request; the offer writes nothing. The session does so at every decision point, and at a stop still in the blind set it shows what `mc17 converge render {stop id} --ledger {the ledger}` prints. It adds the facts he asks for and no route of its own. It records an authority's ruling with `--shown "offer {operation id} {digest}"`, the digest the offer prints on its last line, or with `--shown "render {stop id} {digest}"` where he was shown the rendering of a stop he took out of the set, the digest its `SHOWN` record names; his blind decision at a stop of the set writes that line itself. Where the offer has no proposal to print, the session shows the decision request it prints and names the failure. 14. **under a delegation, validate and then apply**, `mc17 converge validate {operation id}` and `mc17 converge apply {operation id}`, each with `--manifest`, `--ledger`, `--repo` and, at a stopped review stage, `--runner-return`; read the answer, and where it reads `authorized`, run the two commands the application names next; where it reads `stale`, `denied` or `pending`, decide as today and record the deciding entry. Under a delegation in force, at a heavy-run start and at a red stage, the call of `mc17 converge evaluate` applies the decision at once and prints the application: start the one run it admits as the command it prints, through the hook, and run no `mc17 converge apply` there; a decision request of a change of strategy, a challenge or a stop goes to the authority it names. 15. **after a restart, before any other command of the executor**, run `mc17 converge recover --ledger {the ledger} --manifest {the Manifest} --repo {the checkout}` and read what it settled and what it left `outcome unknown`. 16. **every stage acceptance record and every targeted fix ruling carries a speaker line**, `Speaker: {role} {name}, own words, typed by the speaker` for an authority's own, and the executor writes its own; the lock refuses a record without one from this release on. 17. **around a fleet wave**, before the wave, lock and write the fleet script with the installed release, naming the Manifest and the ledger by asset id, the lock taken with `mc17 wave lock --no-clerk`, since the agents of a fleet script hold no corpus credentials and a clerk's command reads the corpus, and start the script from the locked checkout; after the wave, write the runner's return to a file whole; for each entry of a stage's `convergence` that reads `running`, `late` or `failed` and names no decision record, run `mc17 converge evaluate --point {point} --wave-report {the file} --stage {stage} --round {round} --manifest {the Manifest} --ledger {the ledger}`, which reads the facts block of that entry and completes the call; then, at each stop, run the offer of step 13, and under a delegation the validation and the application of step 14. ## What the session reads, and what it leaves alone - **The operator's view.** `mc17 converge view --scope {SCOPE}`, or `--stage {Wave Plan id}/{IP id}`, shows each decision: its position, the action, the reason, the expected benefit with its cost marked as an estimate, the remaining concerns, who can decide, and the module's own cost marked as measured. A sealed proposal is hidden until its reveal, and the view says why. - **The read log.** Every read of a sealed proposal through a command goes into the store's `readlog.jsonl`, with who, when, which command and whether the read was admitted. The session reads a sealed proposal through no other way. - **The set.** `mc17 converge blind --scope {SCOPE} --ledger {the ledger}` prints the set, the number the Business Owner ruled with a `BLIND POINTS {n}` ruling in his own words, and each stop with its place; a stop he ruled on first, in a ruling that names its id or its operation, leaves the set, and the next stop takes its place. A ruling of his in his own words that opens `BLIND EXCLUDES {Wave Plan id}` takes every point of that wave out of the set before it opens: no proposal of the wave is sealed, and its stops count toward no number. - **The records.** Every command but the offer and the recovery sends the records held while the corpus could not be reached and the deciding entries the hook wrote before its own work, and prints what it sent. The offer sends nothing; the recovery sends the deciding entries first, and each held record with the operation it settles, where that operation's payload digest stands. A second run of a command whose record stands sends nothing and prints the record's number. ## What this skill does not do The hook enforces the call at a heavy-run start, and the lock the speaker line of step 16; the other steps rest on the session following this text. The skill decides nothing in the Business Owner's place, and it reads no sealed proposal before its reveal.