Skip to content

dispatch-gates: --tier --residue silently drops --residue — the neighbouring silent-flag-drop that #14294's repair does not reach #14753

Description

@os-litant

Found while implementing #14294 (refuse --tier --commands / --tier --json) in scripts/pm/dispatch-gates.mjs. Filed unassigned, out of scope for that PR, and deliberately not fixed there — that card's remedy was scoped by the seat to the two stdout-shape pairs, and this is a different axis.

The shape

--residue is read in exactly one place, inside the branch that runs the derivation:

const status = derive(paths, { showResidue: process.argv.includes('--residue'), mode, runRecord });

The --tier branch beside it calls tierLines(deriveTier(paths)) and never calls derive, so under --tier the --residue flag is evaluated nowhere. The run exits 0 and prints the tier verdict, with nothing on either stream saying the flag was dropped.

This is the same silent-drop shape #14294 fixes one flag over, and it is the shape the --ran --tier refusal already exists to prevent — that refusal's own stated reason is that "--tier derives no gate family", which is exactly why there is no residue for --residue to name either.

Reproduce

Measured on origin/main at 7a17f3b, with a control so the no-op is not confused with "the flag has nothing to add here":

# CONTROL — --residue demonstrably changes the answer when the derivation runs
node scripts/pm/dispatch-gates.mjs scripts/measure-partial-retirement-annotation.mjs > plain.out
node scripts/pm/dispatch-gates.mjs --residue scripts/measure-partial-retirement-annotation.mjs > residue.out
# 15007 bytes vs 66141 bytes — DIFFERENT

# THE DEFECT — under --tier the same flag is a no-op, at exit 0
node scripts/pm/dispatch-gates.mjs --tier scripts/measure-partial-retirement-annotation.mjs > t-plain.out
node scripts/pm/dispatch-gates.mjs --tier --residue scripts/measure-partial-retirement-annotation.mjs > t-residue.out
# EXIT=0 both; byte-IDENTICAL

Not claimed

Refs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions