Composition integration gate: five-lane composition - #296
Merged
mosesy5688-cell merged 7 commits intoSep 5, 2026
Conversation
… 3-way merged with #291)
…files 3-way merged with #292)
Composition of the five Founder-accepted lanes (#291 #292 #293 #294 #295) replayed from BASE c88c1f5 in the frozen order. This commit isolates everything the composition gate itself authored. F-3 response-contract bindings (MONOTONIC RESPONSE-CONTRACT MARKERS, not product SemVer claims -- they exist so a cached pre-composition body is distinguishable from a post-composition one at the serving boundary): negative-evidence.ts x-sciweon-schema-minor 1.2 -> 1.3 repurposing-evidence.ts x-sciweon-schema-minor 1.0 -> 1.1 target.ts x-sciweon-schema-minor 0.6.0 -> 0.6.1 xrefs.ts x-sciweon-schema-minor 1.1 -> 1.2 mcp.ts SERVER_INFO.version 0.6.0 -> 0.6.1 mcp.ts x-sciweon-mcp-version 0.6.0 -> 0.6.1 PROTOCOL_VERSION (2025-03-26) deliberately UNCHANGED. CI: one read-only identity-recording step in the EXISTING test job. No new job, no widened permissions. continue-on-error keeps a token/API failure from turning CI red; the gate treats any absent value as a qualification failure. Tests: version-sync (SERVER_INFO.version and the x-sciweon-mcp-version header are two distinct bindings; nothing else prevents them diverging), plus the per-surface containment matrix including the repurposing classification lane 3S did not individually verify. KNOWN RED, NOT FIXED HERE: tests/api/target.test.ts:174 asserts x-sciweon-schema-minor === '0.6.0' and now fails against the mandated '0.6.1'. That file is lane #292's accepted content and is one of the 50 files required to stay byte-identical, so the composition gate is not authorised to change it. Escalated for a founder ruling.
…e REST runtime probes
Bounded Correction 1 to the five-lane composition gate. Founder ruling: the
frozen F-3 contract target.ts = '0.6.1' is CORRECT; tests/api/target.test.ts
was a STALE ORACLE still expecting '0.6.0'. The oracle is corrected; the
contract is NOT rolled back.
The corrected assertion remains a real probe: it still calls handleTarget(),
still reads x-sciweon-schema-minor off the real Response, and still compares
by exact equality. Only the wrong expected literal changed.
Closes three REST runtime-coverage gaps. Before this commit the four REST
schema-minor bindings were pinned only by source-text scans in
tests/worker/composition-version-bindings.test.ts; now each is also asserted
against a live handler response:
target 0.6.1 tests/api/target.test.ts
negative-evidence 1.3 tests/api/composition-surface-matrix.test.ts
xrefs 1.2 tests/api/composition-surface-matrix.test.ts
repurposing 1.1 tests/api/composition-containment-matrix.test.ts
The two MCP bindings (SERVER_INFO.version, x-sciweon-mcp-version) already had
real handleMcp() runtime probes and are unchanged.
Qualifies the Tier-2 matrix row so removed_key_count = 6 reads as a
wiring-capacity measurement over an artificially injected fixture, not as a
property of production PubChem Tier-2 data.
Comment-only corrections to two stale bump annotations; no emitted value, no
rights-filter marker and no code changed:
negative-evidence.ts "bumped 1.1 -> 1.2" -> "bumped 1.2 -> 1.3"
xrefs.ts "bumped 1.0 -> 1.1" -> "bumped 1.1 -> 1.2"
Additive commit; five files; no lane content altered. PROTOCOL_VERSION
('2025-03-26') untouched. No merge, no deploy.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019c1bKNiDv8zfaPunCXUANq
This was referenced Sep 5, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composition integration gate -- five-lane composition
Final verified state at
81b9ea8c…Correction 1 did three things beyond clearing the stale oracle:
Corrected the oracle without weakening it.
tests/api/target.test.tsstill calls the real
handleTarget(...), still reads the real responseheader, and still asserts exact equality. Only the expected literal moved
0.6.0 -> 0.6.1. It was not deleted, not loosened to a regex, and notconverted to a source-text scan.
Closed three REST runtime-probe gaps. Before this commit the only test
asserting an emitted
x-sciweon-schema-minorheader wastarget's; theother REST bindings were pinned only by
readFileSyncsource-text scans,which prove a literal is present in a file, not that it reaches the wire.
All four REST bindings now have an exact runtime probe:
0.6.1tests/api/target.test.ts1.2tests/api/composition-surface-matrix.test.ts1.3tests/api/composition-surface-matrix.test.ts1.1tests/api/composition-containment-matrix.test.tsThe two MCP bindings were already covered by real
handleMcp()callsasserting the header,
SERVER_INFO.versionand the response body.Qualified the Tier-2 containment row.
removed_key_count = 6oncompound Tier-2 is a wiring-capacity measurement taken after six claim
containers were artificially injected into the fixture. It is not a
property of current production PubChem Tier-2 data, whose shape does not
carry these containers and where the filter is normally a no-op. The row
proves the Tier-2 path is wired to the filter and would remove the
containers if they appeared -- not that six are removed in production. The
matrix table below should be read with that qualification.
Two stale source comments were also corrected (
negative-evidence.ts1.1 -> 1.2became1.2 -> 1.3;xrefs.ts1.0 -> 1.1became1.1 -> 1.2).Comment tokens only; no emitted value or code changed.
Gates at
81b9ea8c…:test,security-scan,schema-validateandenforce-complianceall pass. CES passes locally. Byte-identity over thesingle-lane files stands at 50, the sole departure from 51 being
tests/api/target.test.ts, which the gate now edits under Founder authority.git ls-files --eol: 806 tracked, 806w/lf, 0w/crlf. Merge-ref parentidentity closes exactly:
parents[0]= PR base =c88c1f52…,parents[1]=81b9ea8c….The
scripts/verify/rk15-v3c-surfaces.jscitation recompute mandated for thisgate produced zero net change; all 21
worker.ts:NNcitations were verifiedcorrect against the composed router (
61negative-evidence,69repurposing,77bioactivities,85trials,93papers,109target,117mcp,125xrefs,133_health, span from61).Historical record (pre-authorisation, retained verbatim)
Composition integration gate -- five-lane composition (DO NOT MERGE, DO NOT DEPLOY)
Composes the five Founder-accepted lanes onto the frozen baseline. No merge,
no deploy, no Factory / R2 / ingest / cursor / latest-pointer movement. The
five original PRs stay OPEN and UNMERGED.
STATUS: COMPOSITION DOES NOT QUALIFY -- one blocking contradiction
tests/api/target.test.ts:174assertsx-sciweon-schema-minor === '0.6.0'.The frozen F-3 binding list mandates
target.tsmove0.6.0 -> 0.6.1. Bothcannot hold. That test file is lane #292's accepted content and one of the 50
files required to remain byte-identical, so the composition gate is not
authorised to change it and did not. The mandated binding was applied and the
resulting failure is left visible for a founder ruling. See "Blocking item".
Replay
Five
BASE..headdiffs applied withgit diff --binary | git apply --3way --index, in the frozen order, one commit per lane, gate content isolated incommit 6.
Zero conflicts. No manual conflict resolution was required anywhere, so no
semantic choice was made.
scripts/factory/lib/aggregated-merger.jsstands at249 lines, byte-identical to #295's head; the gate added nothing to it.
Partition and byte identity
Independently derived and matching the pre-computed partition: 64 (file, lane)
rows, 58 distinct files, 6 multi-lane files, 52 single-lane, no file touched by
three or more lanes.
50 / 50 single-lane files are byte-identical to their own lane head, zero
mismatches (
git cat-file blobcomparison).scripts/verify/rk15-v3c-surfaces.jsalso came out byte-identical, so the true figure is 51 -- see deviations.
What this proves: those files were not altered by the replay. What it does NOT
prove: that the composed system behaves correctly. Two individually unaltered
files can still interact badly. Behaviour is covered by the suite, CES and the
CI gates, and containment separately by the matrix below.
F-3 version bindings (monotonic response-contract markers, NOT product SemVer)
These exist so a cached pre-composition body is distinguishable from a
post-composition one at the serving boundary. They assert nothing about feature
level, stability or API compatibility.
src/worker/api/negative-evidence.tsx-sciweon-schema-minor1.21.3src/worker/api/repurposing-evidence.tsx-sciweon-schema-minor1.01.1src/worker/api/target.tsx-sciweon-schema-minor0.6.00.6.1src/worker/api/xrefs.tsx-sciweon-schema-minor1.11.2src/worker/api/mcp.tsSERVER_INFO.version0.6.00.6.1src/worker/api/mcp.tsx-sciweon-mcp-version0.6.00.6.1PROTOCOL_VERSION(2025-03-26) is unchanged.x-sciweon-rights-filterrc3a-v2is lane #294's, verified not re-authored: 7 literals, allrc3a-v2,zero
rc3a-v1.SERVER_INFO.versionandx-sciweon-mcp-versionare two distinct bindings thathappen to carry the same string; nothing in the source prevents them diverging.
A version-sync test now pins them together.
Per-surface containment matrix
Containment holds everywhere, but the mechanism differs by surface and the two
must not be written as one. Every row is measured, not inferred.
composition-surface-matrix.test.ts:: compound Tier-1composition-surface-matrix.test.ts:: compound Tier-2composition-surface-matrix.test.ts:: negative-evidencecomposition-containment-matrix.test.ts:: CLASSIFICATIONcomposition-surface-matrix.test.ts:: targetcomposition-surface-matrix.test.ts:: xrefs/api/mcpcomposition-surface-matrix.test.ts:: MCP alias/api/v1/mcpcomposition-surface-matrix.test.ts:: MCP aliasrepurposingis classified UPSTREAM_PROJECTION, measured not assumed: theaggregator returns a new literal object and
summarizeNegativeprojects eachexample to
{id, evidence_type}, so containers never enter the payload.Stated plainly: public six-container absence is ESTABLISHED. Active
N > 0filter removal is OBSERVED ON COMPOUND (both tiers).
N = 0after upstreamshaping is OBSERVED on the named shaped surfaces. Active removal on every
surface is NOT claimed. Marker absence on a projection surface is correct and
is not evidence of removal.
CI identity step
One read-only step,
id: composition_identity, in the existingtestjob.No new job, no widened permissions (
contents: readunchanged).continue-on-error: trueso a token or API failure cannot turn CI red -- butthe gate treats any absent or empty value as a qualification failure.
gh apiis used because it is server-side:
actions/checkout@v4defaults tofetch-depth: 1, so a localgit log -1 --format=%Preturns empty here.Placed immediately after checkout so the identity record is emitted even when a
later step fails.
Verification
python scripts/check_compliance.py): PASSED, exit 0.splitlines()semantics): no file exceeds 250. Nogate-touched file is at the cap. The six binding edits are in-place value
substitutions with zero line delta.
git ls-files --eol: 806 tracked, 806w/lf, 0w/crlf.ci.yml+ 3 gate test files = 62.Nothing unauthorised written; no lane file dropped.
The 4 failures, unsuppressed
tests/api/target.test.ts-- the blocking F-3 contradiction above. New,caused by the mandated binding.
2-4.
tests/factory/dailymed-adapter-incremental.test.ts(3 timeouts) --pre-existing and environmental, not composition-caused. The test file
and both its imports are byte-identical to BASE, no composed-diff file is in
its import graph, and the adapter performs real network fetches that the
local sandbox blocks. These may well pass on a GitHub runner, which has
network.
Blocking item for founder ruling
Applying the mandated
target.tsbinding necessarily breaks a lane-owned testassertion. The one-line fix is obvious (
'0.6.0'->'0.6.1'attests/api/target.test.ts:174) but it is outside this gate's authorisation ontwo independent grounds: it edits an accepted lane's content, and it breaks the
50-file byte-identity invariant. No choice was made. The ruling is yours.