Skip to content

feat(sandbox): the molecule puzzle, and why solving it is not enough - #34

Merged
SakarZaidan merged 1 commit into
mainfrom
feat/sandbox-molecules
Sep 16, 2026
Merged

SakarZaidan merged 1 commit into
mainfrom
feat/sandbox-molecules

Conversation

@SakarZaidan

Copy link
Copy Markdown
Owner

A shape-and-chemistry matching exercise, shipped together with the clinical attrition that kills the candidate afterwards. The second half is the design, not an afterthought.

candidate-A:
  Puzzle complementarity 100% (4 matched, 0 clashing, 0 unfilled)
  Preclinical pass chance adjusted to 90% by the fit
  Passed preclinical
  Phase I pass rate 52.0%, unchanged by the fit
  Passed Phase I
  Phase II pass rate 28.9%, unchanged by the fit
  Failed Phase II

Stopped at Phase II: no measurable benefit to patients
  The biggest single reason drugs fail. Over half of late-stage failures are lack
  of efficacy. The target was hit and the patients did not get better, which
  usually means the target was the wrong one.

A perfect solution to the puzzle still usually fails. The fit changes the preclinical odds, because chemistry is what preclinical work tests. It does not touch Phase II at all, because whether a target is the right target is not a question about the molecule. test_a_perfect_fit_does_not_rescue_the_clinical_odds holds that asymmetry across 500 seeds.

Subplan 33 was explicit that a student told "you cured it" has learned something false. Nothing here congratulates anyone who reaches approval; the text says what it is, and a test asserts the wording.

The numbers

The phase rates are the only measured numbers in this sandbox. 52 percent through Phase I, 28.9 through Phase II, 58 through Phase III, 8.1 percent reaching approval, twelve or more years and over 2.5 billion dollars per approved drug. Everything else in the sandbox is ILLUSTRATIVE, and the contrast is deliberate because the failure rates are the curriculum.

test_the_phase_rates_multiply_to_roughly_the_published_overall_rate multiplies the three and checks the product against the published figure, so an edit to one of them cannot drift the lesson quietly.

Refusing to look like a prediction

Verdict is an enum with exactly one member, so there is nowhere to put "calibrated". A test asserts the member count, which makes "this is never a prediction" a fact about the type rather than a convention.

No field is named affinity, potency, IC50 or anything else that reads as a physical quantity, and test_no_result_uses_the_language_of_efficacy checks none appears in a result's attribute surface or its rendered text. The completion measure is called complementarity and its docstring says it is a puzzle fraction.

Safety: curation, and now tested

Subplan 33 argued an intent filter is not implementable. The edit that disables a harmful gene is the same edit reversed, and the software sees identical letters. Any filter would be trivially bypassable or restrictive enough to block real learning, and both failures leave someone believing a control is in place.

What is enforceable is what exists, so four properties now have tests rather than assurances:

  1. The sandbox imports nothing from the design tool. Checked by parsing every module with ast, not by trying an import, because an import inside a function would not show up at runtime and is exactly how this property gets lost. It therefore has no route to synthesis, and integrase-screen's gate is not weakened by the sandbox existing.
  2. Every shipped gene is declared with its origin, and the test fails if a reachable gene is missing from that list.
  3. Exactly one piece of content is not invented: thirteen codons of human haemoglobin beta, needed because the sickle cell variant has to sit at its real position. The test fails if that count rises, which makes adding real sequence a visible decision.
  4. Nothing imports a module that writes files or opens connections.

I broke both structural guards to check they work: added import integrase and import socket to a sandbox module, confirmed each test caught it at the right line, reverted. A guard that cannot fail is worse than no guard, because it reads as assurance.

Self-review

  • 20 new tests, 93 Python tests total. mypy --strict, ruff and the voice check clean.
  • Two bugs found and fixed while writing: str.title() turned "phase II" into "Phase Ii", and a docstring claimed the phase rates multiply to roughly 5 percent when the arithmetic gives 8.7.
  • The documented example output was generated by running the documented code, not written by hand.
  • COMPLEMENTS is tested for symmetry, since a non-symmetric pairing table makes the puzzle unsolvable in one direction and it would not be obvious from reading it.

Not in this PR

Huntington's repeat-count dose response and cystic fibrosis dF508, which need repeat expansion and deletion in Sequence. The zoom navigation subplan 33 describes: the containment hierarchy exists and nothing walks it. Diploid genomes, without which sickle cell recessiveness cannot be taught, which the trait layer currently states in its output rather than modelling. All logged.

A biology educator to review the content remains the largest open item and is not something I can close alone.

A shape-and-chemistry matching exercise, shipped together with the
clinical attrition that kills the candidate afterwards. The second half
is the design, not an afterthought. A student told "you cured it" has
learned something false; one who watches a perfect candidate fail Phase
II for lack of efficacy has learned what medical research requires.

The fit changes the preclinical odds, because chemistry is what
preclinical work tests. It does not touch Phase II at all, because
whether a target is the right target is not a question about the
molecule. That asymmetry is the lesson and a test holds it.

The phase rates are the only measured numbers in this sandbox: 52 percent
through Phase I, 28.9 through Phase II, 58 through Phase III, 8.1 percent
reaching approval. Everything else is illustrative and the contrast is
deliberate, because the failure rates are the curriculum. A test
multiplies the three and checks the product against the published
overall rate, so an edit to one of them cannot drift quietly.

Nothing congratulates a student who reaches approval. A simulator
contains only what was put into it, so someone who cures something inside
it has solved a puzzle someone wrote. Calling that discovery would teach
a false idea of what solving a medical problem takes.

Verdict is an enum with exactly one member, so there is nowhere to put
"calibrated". No field is named affinity, potency, or anything else that
reads as a physical quantity, and a test checks that none appears in a
result's surface or its text.

Safety is curation and the curation is now tested rather than asserted.
An intent filter is not implementable: the edit that disables a harmful
gene is the same edit reversed, and the software sees identical letters.
What is enforceable is what exists. The sandbox imports nothing from the
design tool, checked by parsing every module so that an import inside a
function cannot slip through, which means it has no route to synthesis
and the screening gate is not weakened by it existing. Every shipped gene
is declared with its origin. Exactly one piece of content is not
invented, thirteen codons of human haemoglobin beta, needed because the
sickle cell variant has to sit at its real position, and a test fails if
that count rises. Nothing imports a module that writes files or opens
connections.

Both structural guards were checked by breaking them: adding `import
integrase` and `import socket` to a sandbox module, confirming each test
caught it, and reverting. A guard that cannot fail is worse than no
guard, because it reads as assurance.
@SakarZaidan
SakarZaidan merged commit 65d5a90 into main Sep 16, 2026
11 checks passed
@SakarZaidan
SakarZaidan deleted the feat/sandbox-molecules branch September 16, 2026 17:17
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