Skip to content

Archetype P: the port requirement follows the stage, not the language - #27

Merged
yamierick merged 2 commits into
mainfrom
petition/port-follows-the-stage
Sep 13, 2026
Merged

Archetype P: the port requirement follows the stage, not the language#27
yamierick merged 2 commits into
mainfrom
petition/port-follows-the-stage

Conversation

@yamierick

Copy link
Copy Markdown
Contributor

PETITION — not adopted until you merge it. Raised from the pre-deposit audit of
sear-labs/water-energy-coopt-scs-2021, before the port was started rather than after, so
the sightings below are measurements of the repository as it stood.

Full reasoning, the counter-argument, and what this deliberately does not change are in
yamierick/claude-notes, notes/2026-09-11-petition-port-follows-the-stage.md.

Governance position

Floor is two sightings for a new rule, one for a defect.

# Item Kind Sightings Clears floor?
A P justifies the reporting-port obligation by how many languages a reader must have, then states a rule wider than that rationale defect 1 yes
B Stage 8 forbids "another language" with no exception for a run-once stage — the exception the same archetype already grants the archived model defect 1 yes
C The port/archive decision is settled by whether a reader must re-run the stage new rule 2, pointing opposite ways yes

Why the rationale and the rule disagree

The rationale is about a reader's barrier. The rule is about the repository's file
inventory
. They coincide for every stage except one: a stage that never runs again.

The archetype already tolerates a proprietary language in exactly that case — the archived GAMS
original stays GAMS and nothing treats it as debt. The reason is not that a model is special; it
is that archived means run-once, and the language of a stage nobody executes costs a reader
nothing. Apply the same test to a reporting layer and the current wording forbids the answer it
gives.

The two sightings, pointing opposite ways

Archive is right — water-energy-coopt-scs-2021. 2,776 lines of R reading indata1/2/3.xlsx
sheet Results (raw GAMS output), deriving costs, capacity, production, curtailment, purchases,
demand and the PI shares, copy-pasted per scenario, persisting only save.image() to an .RData
blob. Its inputs are restricted Pecan Street derivatives; neither they nor the .RData exist on
the machine, and R is not installed. It cannot run again for anyone. Its outputs — thirteen
figure PDFs — are already committed.

Port was right — fews-stochopt-esd-2022. The R "reporting" directory held a Markov chain
producing model inputs. A reader regenerating scenarios must run it, and RNG streams do not
cross languages, so leaving it in R would make the reproducibility claim span two implementations
with nothing able to bridge them. Already recorded in the standard, but filed as a warning about
mislabelling — which is the smaller half. The operative difference is that one stage must be
re-run and the other never will be.

The two edits

  1. Replaces the final sentence of The rule: one working language with the stage test, three
    deciding questions, the maintenance-versus-access distinction, both measurements, and an
    explicit statement that archiving does not excuse the layer's other defects.
  2. Stage 8's analysis code line gains the run-once exception and a pointer to the test, keeping
    the generator case explicit because it is the one that looks like reporting and is not.

What this does not change

Figures read cleaned output, never raw — untouched, and it is the rule that actually condemns
the archived layer. Cleaned output is committed — untouched, and load-bearing: archiving the
producer is only safe because its output is committed and verifiable without it. Amendment 8's
analysis-port guidance — untouched, now governing the layers the stage test selects. The
as.character precision trap — untouched, and arguably strengthened, since it is a cross-language
handoff failure. One maintained implementation in Python — untouched for anything a reader runs.

The counter-argument, stated fairly

"Runs once" is a claim about the future and it can go stale. Two things mitigate it and neither
dissolves it: the freeze test P already requires makes the designation load-bearing rather than
decorative, and the trigger is the one the split rule already uses — a second consumer appears,
the higher bar applies. This replaces judge the language with judge whether it runs again,
which is a question about the repository rather than about a licence. A reviewer who thinks the
current absolute is worth its false positives should say so; its cost here was 2,776 lines of
dead port.

🤖 Generated with Claude Code

yamierick and others added 2 commits September 11, 2026 16:49
Two defects and one new rule. Full reasoning, measurements and the
counter-argument are in yamierick/claude-notes, notes/2026-09-11.

THE DEFECTS. P justifies the reporting-port obligation by how many languages a
reader must have, then states a rule wider than that rationale. The rationale
is about a reader's barrier; the rule is about the repository's file inventory.
Those coincide everywhere except one case - a stage that never runs again - and
the archetype already tolerates a proprietary language in exactly that case.
The archived GAMS original stays GAMS, and nothing calls that debt. Stage 8's
"not another language" carries no such exception.

THE RULE. A stage a reader must re-run is ported; a stage that ran once and
committed its output is archived, whatever language it is in. Two sightings,
pointing opposite ways, which is what makes it a test rather than a preference:
water-energy-coopt-scs-2021, where 2,776 lines of R read restricted workbooks
that are absent and write an R workspace image, so nobody can re-run it -
archived; and fews-stochopt-esd-2022, where the R "reporting" layer held a
Markov chain generating model inputs, which a reader must re-run and where RNG
streams cannot cross languages - ported.

The amendment keeps the generator case explicit, because it is the one that
looks like reporting and is not. It also says plainly that archiving is not a
way to avoid the work: the archived layer still had three real defects, none of
them named by a language rule, and all three survive the decision to archive.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The amendment said the archived R layer "cannot run for anyone". Hours later
it was re-run by its author, from a private drive, and it reproduced the
published figures.

The archive decision is unchanged - the test asks whether a READER must re-run
the stage, and no reader can. But the justification given was false, and false
in the direction that flatters the conclusion, which is the failure mode worth
naming in the text rather than quietly fixing. So the correction is in the
document, as a note, not just in the diff.

Two additions the re-run earned:

- Archiving is a decision about a stage, not a certificate about its condition.
  The layer still had three defects and all three survive the decision.
- The archived stage's OUTPUT must be committed, which is what makes archiving
  safe rather than convenient. One script, 31 tables, 126 KB, after which the
  paper's numbers were checkable with no R and no solver. An archived stage
  whose output is not committed has not been archived, it has been abandoned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yamierick

Copy link
Copy Markdown
Contributor Author

Correction pushed, and it is worth reading before the rest.

The amendment claimed the archived R layer "cannot run for anyone." That was wrong. A few hours after opening this PR I found the inputs — they are on the author's Google Drive, not the machine I had searched — and R 4.6.1 was already installed, just absent from PATH. A scratch copy of the archived .Rmd, repointed at the workspace image, ran clean and regenerated six of the published figures, matching the committed PDFs bar for bar.

The archive decision is unchanged. The test asks whether a reader must re-run the stage, and no reader can: the inputs are not distributable. But the reason I gave was a stronger, easier-to-say version of the actual test, and it was false. That failure is now named in the amendment text rather than quietly patched out of the diff, because it is the same shape as the mistake that produced the rule.

Two things the re-run earned, both now in the text:

  • Archiving is a decision about a stage, not a certificate about its condition. The layer still had three real defects — raw-parsing instead of a cleaned tier, no committed cleaned output, a notebook where a script belongs — and all three survive the decision to archive.
  • The archived stage's output must be committed, which is what makes archiving safe rather than merely convenient. Extracting the aggregates took one script and produced 31 tables at 126 KB, after which the paper's own numbers are checkable with no R, no solver and no restricted input. An archived stage whose output is not committed has not been archived, it has been abandoned.

The governance table is unaffected: still two defects and one new rule, still two sightings pointing opposite ways.

@yamierick
yamierick merged commit e8c9dcb into main Sep 13, 2026
@yamierick
yamierick deleted the petition/port-follows-the-stage branch September 13, 2026 19:23
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