element-web v1.0.1 ENV-PATCH overlays (envfix_v101_20260818, ruling B-prime)
Browse files19 eval-side overlay Dockerfiles per docs/image-patching.md, ruling B-prime:
- every image lacking it: hrp 5.2.2 nested 13-payload closure (pure addition)
- sub-02/sub-03: full offline END-vintage yarn install (599112e precedent)
+ linkify-element presence re-add on the rebuilt tree + WASM link check
+ shipped-state restore
- e662c19/7ff1fd2 ONLY: compound-design-tokens 4.0.0 -> 4.0.1 (own SRS
contract alignment, decoupled non-blocking canaries)
- linkify-element untouched everywhere else (presence semantics; §6.0
amendment supersedes exact-pin); no icon-subpath asserts (retracted theory:
see campaign evidence/INCIDENT-20260818-compound-misclassification.md)
Detection: env_deps_staging/<range>/PHASE4_REPORT.md + CORRECTION (harness).
Campaign: SWE-Milestone-log/reeval/envfix_v101_20260818 (no promotion).
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/feature_enhancements/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/maintenance_bug_fixes/Dockerfile.v1.0.1 +94 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/maintenance_infrastructure/Dockerfile.v1.0.1 +104 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/maintenance_ui_ux/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_05df321_1/Dockerfile.v1.0.1 +94 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_3762d40_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_3f47487_1/Dockerfile.v1.0.1 +96 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_56c7fc1_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_599112e_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_7ff1fd2_1/Dockerfile.v1.0.1 +106 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_8bb4d44_1/Dockerfile.v1.0.1 +96 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_aa99601_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_be3778b_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_e662c19_1/Dockerfile.v1.0.1 +110 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_e9a3625_1_sub-01/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_e9a3625_1_sub-02/Dockerfile.v1.0.1 +139 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_e9a3625_1_sub-03/Dockerfile.v1.0.1 +156 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_f59af37_1/Dockerfile.v1.0.1 +99 -0
- element-hq_element-web_v1.11.95_v1.11.97/dockerfiles/milestone_seed_fba5938_1/Dockerfile.v1.0.1 +99 -0
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — feature_enhancements
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/feature_enhancements/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__feature_enhancements:v1.0.1-rc1 dockerfiles/feature_enhancements/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__feature_enhancements:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[feature_enhancements]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[feature_enhancements]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[feature_enhancements]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[feature_enhancements] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — maintenance_bug_fixes
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: none of its own — this image already resolves all three signature
|
| 8 |
+
# packages (Phase-2 probe). The overlay is guard+assert only, expected no-op;
|
| 9 |
+
# it exists so the whole v1.0.1 set carries the same verified envelope
|
| 10 |
+
# invariant and a uniform rc lineage.
|
| 11 |
+
#
|
| 12 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 13 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 14 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 15 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 16 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 17 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 18 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 19 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 20 |
+
#
|
| 21 |
+
# Build (BuildKit, offline):
|
| 22 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 23 |
+
# -f dockerfiles/maintenance_bug_fixes/Dockerfile.v1.0.1 \
|
| 24 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_bug_fixes:v1.0.1-rc1 dockerfiles/maintenance_bug_fixes/
|
| 25 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_bug_fixes:v1.0
|
| 26 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 27 |
+
|
| 28 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 29 |
+
FROM ${SOURCE_IMAGE}
|
| 30 |
+
|
| 31 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 32 |
+
set -eu
|
| 33 |
+
cd /testbed
|
| 34 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 35 |
+
NM=/testbed/node_modules
|
| 36 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 37 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 38 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 39 |
+
rm -rf "${2:?}/$3"
|
| 40 |
+
cp -a "$src" "$2/$3"
|
| 41 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 42 |
+
}
|
| 43 |
+
pv() { node -e '
|
| 44 |
+
const{createRequire}=require("module");const path=require("path");
|
| 45 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 46 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 47 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 48 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 49 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 50 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 51 |
+
ACTIONS=""
|
| 52 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 53 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 54 |
+
else
|
| 55 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 56 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 57 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 58 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 59 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 60 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 61 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 62 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 63 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 64 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 65 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 66 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 67 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 68 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 69 |
+
fi
|
| 70 |
+
echo "ENVFIX-INFO[maintenance_bug_fixes]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 71 |
+
echo "ENVFIX-INFO[maintenance_bug_fixes]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 72 |
+
echo "ENVFIX-ACTION[maintenance_bug_fixes]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 73 |
+
EOS
|
| 74 |
+
|
| 75 |
+
RUN <<'EOS'
|
| 76 |
+
set -eu
|
| 77 |
+
cd /testbed
|
| 78 |
+
node <<'EOJS'
|
| 79 |
+
const{createRequire}=require('module');const path=require('path');
|
| 80 |
+
const r=createRequire('/testbed/x.js');
|
| 81 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 82 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 83 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 84 |
+
return require(path.join(d,'package.json')).version;}
|
| 85 |
+
const hrp=pv('html-react-parser');
|
| 86 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 87 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 88 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 89 |
+
require(r.resolve('linkify-element'));
|
| 90 |
+
require(r.resolve('linkifyjs'));
|
| 91 |
+
// compound untouched on this image (no own-contract pin)
|
| 92 |
+
console.log(`ENVFIX-ASSERT[maintenance_bug_fixes] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 93 |
+
EOJS
|
| 94 |
+
EOS
|
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — maintenance_infrastructure
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# NOTE: the v1.0 image for this milestone is ABSENT from this machine AND from
|
| 18 |
+
# manifests/digests-v1.0.tsv (release-manifest gap found in Batch-0 prep).
|
| 19 |
+
# This overlay is authored for use AFTER the image is restored by digest from
|
| 20 |
+
# another eval host or the gap is adjudicated. Guards decide actual actions.
|
| 21 |
+
#
|
| 22 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 23 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 24 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 25 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 26 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 27 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 28 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 29 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 30 |
+
#
|
| 31 |
+
# Build (BuildKit, offline):
|
| 32 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 33 |
+
# -f dockerfiles/maintenance_infrastructure/Dockerfile.v1.0.1 \
|
| 34 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_infrastructure:v1.0.1-rc1 dockerfiles/maintenance_infrastructure/
|
| 35 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_infrastructure:v1.0
|
| 36 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 37 |
+
|
| 38 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 39 |
+
FROM ${SOURCE_IMAGE}
|
| 40 |
+
|
| 41 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 42 |
+
set -eu
|
| 43 |
+
cd /testbed
|
| 44 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 45 |
+
NM=/testbed/node_modules
|
| 46 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 47 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 48 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 49 |
+
rm -rf "${2:?}/$3"
|
| 50 |
+
cp -a "$src" "$2/$3"
|
| 51 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 52 |
+
}
|
| 53 |
+
pv() { node -e '
|
| 54 |
+
const{createRequire}=require("module");const path=require("path");
|
| 55 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 56 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 57 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 58 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 59 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 60 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 61 |
+
ACTIONS=""
|
| 62 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 63 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 64 |
+
else
|
| 65 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 66 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 67 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 68 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 69 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 70 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 71 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 72 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 73 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 74 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 75 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 76 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 77 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 78 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 79 |
+
fi
|
| 80 |
+
echo "ENVFIX-INFO[maintenance_infrastructure]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 81 |
+
echo "ENVFIX-INFO[maintenance_infrastructure]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 82 |
+
echo "ENVFIX-ACTION[maintenance_infrastructure]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 83 |
+
EOS
|
| 84 |
+
|
| 85 |
+
RUN <<'EOS'
|
| 86 |
+
set -eu
|
| 87 |
+
cd /testbed
|
| 88 |
+
node <<'EOJS'
|
| 89 |
+
const{createRequire}=require('module');const path=require('path');
|
| 90 |
+
const r=createRequire('/testbed/x.js');
|
| 91 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 92 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 93 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 94 |
+
return require(path.join(d,'package.json')).version;}
|
| 95 |
+
const hrp=pv('html-react-parser');
|
| 96 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 97 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 98 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 99 |
+
require(r.resolve('linkify-element'));
|
| 100 |
+
require(r.resolve('linkifyjs'));
|
| 101 |
+
// compound untouched on this image (no own-contract pin)
|
| 102 |
+
console.log(`ENVFIX-ASSERT[maintenance_infrastructure] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 103 |
+
EOJS
|
| 104 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — maintenance_ui_ux
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/maintenance_ui_ux/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_ui_ux:v1.0.1-rc1 dockerfiles/maintenance_ui_ux/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__maintenance_ui_ux:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[maintenance_ui_ux]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[maintenance_ui_ux]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[maintenance_ui_ux]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[maintenance_ui_ux] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_05df321_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: none of its own — this image already resolves all three signature
|
| 8 |
+
# packages (Phase-2 probe). The overlay is guard+assert only, expected no-op;
|
| 9 |
+
# it exists so the whole v1.0.1 set carries the same verified envelope
|
| 10 |
+
# invariant and a uniform rc lineage.
|
| 11 |
+
#
|
| 12 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 13 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 14 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 15 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 16 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 17 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 18 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 19 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 20 |
+
#
|
| 21 |
+
# Build (BuildKit, offline):
|
| 22 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 23 |
+
# -f dockerfiles/milestone_seed_05df321_1/Dockerfile.v1.0.1 \
|
| 24 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_05df321_1:v1.0.1-rc1 dockerfiles/milestone_seed_05df321_1/
|
| 25 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_05df321_1:v1.0
|
| 26 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 27 |
+
|
| 28 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 29 |
+
FROM ${SOURCE_IMAGE}
|
| 30 |
+
|
| 31 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 32 |
+
set -eu
|
| 33 |
+
cd /testbed
|
| 34 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 35 |
+
NM=/testbed/node_modules
|
| 36 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 37 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 38 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 39 |
+
rm -rf "${2:?}/$3"
|
| 40 |
+
cp -a "$src" "$2/$3"
|
| 41 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 42 |
+
}
|
| 43 |
+
pv() { node -e '
|
| 44 |
+
const{createRequire}=require("module");const path=require("path");
|
| 45 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 46 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 47 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 48 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 49 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 50 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 51 |
+
ACTIONS=""
|
| 52 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 53 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 54 |
+
else
|
| 55 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 56 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 57 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 58 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 59 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 60 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 61 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 62 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 63 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 64 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 65 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 66 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 67 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 68 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 69 |
+
fi
|
| 70 |
+
echo "ENVFIX-INFO[milestone_seed_05df321_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 71 |
+
echo "ENVFIX-INFO[milestone_seed_05df321_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 72 |
+
echo "ENVFIX-ACTION[milestone_seed_05df321_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 73 |
+
EOS
|
| 74 |
+
|
| 75 |
+
RUN <<'EOS'
|
| 76 |
+
set -eu
|
| 77 |
+
cd /testbed
|
| 78 |
+
node <<'EOJS'
|
| 79 |
+
const{createRequire}=require('module');const path=require('path');
|
| 80 |
+
const r=createRequire('/testbed/x.js');
|
| 81 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 82 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 83 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 84 |
+
return require(path.join(d,'package.json')).version;}
|
| 85 |
+
const hrp=pv('html-react-parser');
|
| 86 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 87 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 88 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 89 |
+
require(r.resolve('linkify-element'));
|
| 90 |
+
require(r.resolve('linkifyjs'));
|
| 91 |
+
// compound untouched on this image (no own-contract pin)
|
| 92 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_05df321_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 93 |
+
EOJS
|
| 94 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_3762d40_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_3762d40_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_3762d40_1:v1.0.1-rc1 dockerfiles/milestone_seed_3762d40_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_3762d40_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_3762d40_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_3762d40_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_3762d40_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_3762d40_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_3f47487_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: none of its own — hrp/linkify/compound all resolve (Phase-2
|
| 8 |
+
# probe). Ruling B-prime (2026-08-18): linkify presence semantics — the
|
| 9 |
+
# existing copy (4.1.4 env-patch here at 3f47487 / 4.3.2 hand-commit at
|
| 10 |
+
# 8bb4d44) is COMPATIBLE and stays untouched; exact-4.2.0 replacement of
|
| 11 |
+
# round-1 fix #3 is superseded by the policy correction. Overlay is
|
| 12 |
+
# assert-only for a uniform verified rc lineage.
|
| 13 |
+
#
|
| 14 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 15 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 16 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 17 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 18 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 19 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 20 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 21 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 22 |
+
#
|
| 23 |
+
# Build (BuildKit, offline):
|
| 24 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 25 |
+
# -f dockerfiles/milestone_seed_3f47487_1/Dockerfile.v1.0.1 \
|
| 26 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_3f47487_1:v1.0.1-rc1 dockerfiles/milestone_seed_3f47487_1/
|
| 27 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_3f47487_1:v1.0
|
| 28 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 29 |
+
|
| 30 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 31 |
+
FROM ${SOURCE_IMAGE}
|
| 32 |
+
|
| 33 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 34 |
+
set -eu
|
| 35 |
+
cd /testbed
|
| 36 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 37 |
+
NM=/testbed/node_modules
|
| 38 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 39 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 40 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 41 |
+
rm -rf "${2:?}/$3"
|
| 42 |
+
cp -a "$src" "$2/$3"
|
| 43 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 44 |
+
}
|
| 45 |
+
pv() { node -e '
|
| 46 |
+
const{createRequire}=require("module");const path=require("path");
|
| 47 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 48 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 49 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 50 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 51 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 52 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 53 |
+
ACTIONS=""
|
| 54 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 55 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 56 |
+
else
|
| 57 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 58 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 59 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 60 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 61 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 62 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 63 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 64 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 65 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 66 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 67 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 68 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 69 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 70 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 71 |
+
fi
|
| 72 |
+
echo "ENVFIX-INFO[milestone_seed_3f47487_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 73 |
+
echo "ENVFIX-INFO[milestone_seed_3f47487_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 74 |
+
echo "ENVFIX-ACTION[milestone_seed_3f47487_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 75 |
+
EOS
|
| 76 |
+
|
| 77 |
+
RUN <<'EOS'
|
| 78 |
+
set -eu
|
| 79 |
+
cd /testbed
|
| 80 |
+
node <<'EOJS'
|
| 81 |
+
const{createRequire}=require('module');const path=require('path');
|
| 82 |
+
const r=createRequire('/testbed/x.js');
|
| 83 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 84 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 85 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 86 |
+
return require(path.join(d,'package.json')).version;}
|
| 87 |
+
const hrp=pv('html-react-parser');
|
| 88 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 89 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 90 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 91 |
+
require(r.resolve('linkify-element'));
|
| 92 |
+
require(r.resolve('linkifyjs'));
|
| 93 |
+
// compound untouched on this image (no own-contract pin)
|
| 94 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_3f47487_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 95 |
+
EOJS
|
| 96 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_56c7fc1_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_56c7fc1_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_56c7fc1_1:v1.0.1-rc1 dockerfiles/milestone_seed_56c7fc1_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_56c7fc1_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_56c7fc1_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_56c7fc1_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_56c7fc1_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_56c7fc1_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_599112e_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_599112e_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_599112e_1:v1.0.1-rc1 dockerfiles/milestone_seed_599112e_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_599112e_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_599112e_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_599112e_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_599112e_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_599112e_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_7ff1fd2_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: own SRS contract declares @vector-im/compound-design-tokens 4.0.1
|
| 8 |
+
# upgraded; the v1.0 image ships 4.0.0 — own-contract alignment, decoupled
|
| 9 |
+
# from the campaign (ruling B-prime; non-blocking golden CANARY paired with
|
| 10 |
+
# e662c19). Also adds the CTE-envelope hrp closure (image lacks
|
| 11 |
+
# html-react-parser).
|
| 12 |
+
#
|
| 13 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 14 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 15 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 16 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 17 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 18 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 19 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 20 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 21 |
+
#
|
| 22 |
+
# Build (BuildKit, offline):
|
| 23 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 24 |
+
# -f dockerfiles/milestone_seed_7ff1fd2_1/Dockerfile.v1.0.1 \
|
| 25 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_7ff1fd2_1:v1.0.1-rc1 dockerfiles/milestone_seed_7ff1fd2_1/
|
| 26 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_7ff1fd2_1:v1.0
|
| 27 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 28 |
+
|
| 29 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 30 |
+
FROM ${SOURCE_IMAGE}
|
| 31 |
+
|
| 32 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 33 |
+
set -eu
|
| 34 |
+
cd /testbed
|
| 35 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 36 |
+
NM=/testbed/node_modules
|
| 37 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 38 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 39 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 40 |
+
rm -rf "${2:?}/$3"
|
| 41 |
+
cp -a "$src" "$2/$3"
|
| 42 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 43 |
+
}
|
| 44 |
+
pv() { node -e '
|
| 45 |
+
const{createRequire}=require("module");const path=require("path");
|
| 46 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 47 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 48 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 49 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 50 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 51 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 52 |
+
ACTIONS=""
|
| 53 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 54 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 55 |
+
else
|
| 56 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 57 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 58 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 59 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 60 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 61 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 62 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 63 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 64 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 65 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 66 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 67 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 68 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 69 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 70 |
+
fi
|
| 71 |
+
echo "ENVFIX-INFO[milestone_seed_7ff1fd2_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 72 |
+
CV="$(pv @vector-im/compound-design-tokens)"
|
| 73 |
+
if [ "$CV" = "4.0.1" ]; then
|
| 74 |
+
echo "ENVFIX-SKIP: compound-design-tokens already 4.0.1"
|
| 75 |
+
else
|
| 76 |
+
echo "ENVFIX-REPLACE: compound-design-tokens $CV -> 4.0.1 (own SRS contract; ruling B-prime canary)"
|
| 77 |
+
cpkg npm-@vector-im-compound-design-tokens-4.0.1-5c4ea7ad664d8e6206dc42e41649c80ef060a760-integrity "$NM" "@vector-im/compound-design-tokens"
|
| 78 |
+
ACTIONS="$ACTIONS compound-design-tokens@4.0.1(was:$CV)"
|
| 79 |
+
fi
|
| 80 |
+
echo "ENVFIX-ACTION[milestone_seed_7ff1fd2_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 81 |
+
EOS
|
| 82 |
+
|
| 83 |
+
RUN <<'EOS'
|
| 84 |
+
set -eu
|
| 85 |
+
cd /testbed
|
| 86 |
+
node <<'EOJS'
|
| 87 |
+
const{createRequire}=require('module');const path=require('path');
|
| 88 |
+
const r=createRequire('/testbed/x.js');
|
| 89 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 90 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 91 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 92 |
+
return require(path.join(d,'package.json')).version;}
|
| 93 |
+
const hrp=pv('html-react-parser');
|
| 94 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 95 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 96 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 97 |
+
require(r.resolve('linkify-element'));
|
| 98 |
+
require(r.resolve('linkifyjs'));
|
| 99 |
+
// own-contract images (e662c19/7ff1fd2): exact 4.0.1 + reality-based icon checks
|
| 100 |
+
const cpd=pv('@vector-im/compound-design-tokens');
|
| 101 |
+
if(cpd!=='4.0.1')throw new Error('assert compound: '+cpd);
|
| 102 |
+
const icons=require(r.resolve('@vector-im/compound-design-tokens/assets/web/icons'));
|
| 103 |
+
if(!('VisibilityOffIcon' in icons))throw new Error('assert compound icons index: VisibilityOffIcon missing');
|
| 104 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_7ff1fd2_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 105 |
+
EOJS
|
| 106 |
+
EOS
|
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_8bb4d44_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: none of its own — hrp/linkify/compound all resolve (Phase-2
|
| 8 |
+
# probe). Ruling B-prime (2026-08-18): linkify presence semantics — the
|
| 9 |
+
# existing copy (4.1.4 env-patch here at 3f47487 / 4.3.2 hand-commit at
|
| 10 |
+
# 8bb4d44) is COMPATIBLE and stays untouched; exact-4.2.0 replacement of
|
| 11 |
+
# round-1 fix #3 is superseded by the policy correction. Overlay is
|
| 12 |
+
# assert-only for a uniform verified rc lineage.
|
| 13 |
+
#
|
| 14 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 15 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 16 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 17 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 18 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 19 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 20 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 21 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 22 |
+
#
|
| 23 |
+
# Build (BuildKit, offline):
|
| 24 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 25 |
+
# -f dockerfiles/milestone_seed_8bb4d44_1/Dockerfile.v1.0.1 \
|
| 26 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_8bb4d44_1:v1.0.1-rc1 dockerfiles/milestone_seed_8bb4d44_1/
|
| 27 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_8bb4d44_1:v1.0
|
| 28 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 29 |
+
|
| 30 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 31 |
+
FROM ${SOURCE_IMAGE}
|
| 32 |
+
|
| 33 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 34 |
+
set -eu
|
| 35 |
+
cd /testbed
|
| 36 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 37 |
+
NM=/testbed/node_modules
|
| 38 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 39 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 40 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 41 |
+
rm -rf "${2:?}/$3"
|
| 42 |
+
cp -a "$src" "$2/$3"
|
| 43 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 44 |
+
}
|
| 45 |
+
pv() { node -e '
|
| 46 |
+
const{createRequire}=require("module");const path=require("path");
|
| 47 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 48 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 49 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 50 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 51 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 52 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 53 |
+
ACTIONS=""
|
| 54 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 55 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 56 |
+
else
|
| 57 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 58 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 59 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 60 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 61 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 62 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 63 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 64 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 65 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 66 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 67 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 68 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 69 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 70 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 71 |
+
fi
|
| 72 |
+
echo "ENVFIX-INFO[milestone_seed_8bb4d44_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 73 |
+
echo "ENVFIX-INFO[milestone_seed_8bb4d44_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 74 |
+
echo "ENVFIX-ACTION[milestone_seed_8bb4d44_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 75 |
+
EOS
|
| 76 |
+
|
| 77 |
+
RUN <<'EOS'
|
| 78 |
+
set -eu
|
| 79 |
+
cd /testbed
|
| 80 |
+
node <<'EOJS'
|
| 81 |
+
const{createRequire}=require('module');const path=require('path');
|
| 82 |
+
const r=createRequire('/testbed/x.js');
|
| 83 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 84 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 85 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 86 |
+
return require(path.join(d,'package.json')).version;}
|
| 87 |
+
const hrp=pv('html-react-parser');
|
| 88 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 89 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 90 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 91 |
+
require(r.resolve('linkify-element'));
|
| 92 |
+
require(r.resolve('linkifyjs'));
|
| 93 |
+
// compound untouched on this image (no own-contract pin)
|
| 94 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_8bb4d44_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 95 |
+
EOJS
|
| 96 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_aa99601_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_aa99601_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_aa99601_1:v1.0.1-rc1 dockerfiles/milestone_seed_aa99601_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_aa99601_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_aa99601_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_aa99601_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_aa99601_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_aa99601_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_be3778b_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_be3778b_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_be3778b_1:v1.0.1-rc1 dockerfiles/milestone_seed_be3778b_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_be3778b_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_be3778b_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_be3778b_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_be3778b_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_be3778b_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_e662c19_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: own SRS contract declares @vector-im/compound-design-tokens 4.0.1
|
| 8 |
+
# upgraded; the v1.0 image ships 4.0.0 — own-contract version-drift repair
|
| 9 |
+
# (ruling B-prime: DECOUPLED from the campaign, no cell depends on it; the
|
| 10 |
+
# earlier eye-off signature theory is RETRACTED, see
|
| 11 |
+
# evidence/INCIDENT-20260818-compound-misclassification.md). This image is a
|
| 12 |
+
# non-blocking golden CANARY: any undeclared golden delta excludes it (and
|
| 13 |
+
# 7ff1fd2) from the rc set without stopping the campaign. Also adds the
|
| 14 |
+
# CTE-envelope hrp closure (image lacks html-react-parser; 2 hrp D-class
|
| 15 |
+
# cells observed here).
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_e662c19_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e662c19_1:v1.0.1-rc1 dockerfiles/milestone_seed_e662c19_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e662c19_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_e662c19_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
CV="$(pv @vector-im/compound-design-tokens)"
|
| 77 |
+
if [ "$CV" = "4.0.1" ]; then
|
| 78 |
+
echo "ENVFIX-SKIP: compound-design-tokens already 4.0.1"
|
| 79 |
+
else
|
| 80 |
+
echo "ENVFIX-REPLACE: compound-design-tokens $CV -> 4.0.1 (own SRS contract; ruling B-prime canary)"
|
| 81 |
+
cpkg npm-@vector-im-compound-design-tokens-4.0.1-5c4ea7ad664d8e6206dc42e41649c80ef060a760-integrity "$NM" "@vector-im/compound-design-tokens"
|
| 82 |
+
ACTIONS="$ACTIONS compound-design-tokens@4.0.1(was:$CV)"
|
| 83 |
+
fi
|
| 84 |
+
echo "ENVFIX-ACTION[milestone_seed_e662c19_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 85 |
+
EOS
|
| 86 |
+
|
| 87 |
+
RUN <<'EOS'
|
| 88 |
+
set -eu
|
| 89 |
+
cd /testbed
|
| 90 |
+
node <<'EOJS'
|
| 91 |
+
const{createRequire}=require('module');const path=require('path');
|
| 92 |
+
const r=createRequire('/testbed/x.js');
|
| 93 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 94 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 95 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 96 |
+
return require(path.join(d,'package.json')).version;}
|
| 97 |
+
const hrp=pv('html-react-parser');
|
| 98 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 99 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 100 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 101 |
+
require(r.resolve('linkify-element'));
|
| 102 |
+
require(r.resolve('linkifyjs'));
|
| 103 |
+
// own-contract images (e662c19/7ff1fd2): exact 4.0.1 + reality-based icon checks
|
| 104 |
+
const cpd=pv('@vector-im/compound-design-tokens');
|
| 105 |
+
if(cpd!=='4.0.1')throw new Error('assert compound: '+cpd);
|
| 106 |
+
const icons=require(r.resolve('@vector-im/compound-design-tokens/assets/web/icons'));
|
| 107 |
+
if(!('VisibilityOffIcon' in icons))throw new Error('assert compound icons index: VisibilityOffIcon missing');
|
| 108 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_e662c19_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 109 |
+
EOJS
|
| 110 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_e9a3625_1_sub-01
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_e9a3625_1_sub-01/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-01:v1.0.1-rc1 dockerfiles/milestone_seed_e9a3625_1_sub-01/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-01:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_e9a3625_1_sub-01]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_e9a3625_1_sub-01]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_e9a3625_1_sub-01]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_e9a3625_1_sub-01] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_e9a3625_1_sub-02
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology (env-deps-audit Phase 4, 2026-08-17): the v1.0 image preserves base
|
| 8 |
+
# v1.11.95 node_modules and never runs any install, while this milestone's tree
|
| 9 |
+
# requires html-react-parser@^5.2.2 (locked 5.2.2). GT suites HtmlUtils-test /
|
| 10 |
+
# renderer/pill-test / renderer/link-tooltip-test fail collection in EVERY arm
|
| 11 |
+
# (56 B-class cells) and the shipped golden baseline itself silently zeroed
|
| 12 |
+
# those suites (0 ids vs 36 at every other milestone).
|
| 13 |
+
#
|
| 14 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 15 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 16 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 17 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 18 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 19 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 20 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 21 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 22 |
+
#
|
| 23 |
+
# Build (BuildKit, offline):
|
| 24 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 25 |
+
# -f dockerfiles/milestone_seed_e9a3625_1_sub-02/Dockerfile.v1.0.1 \
|
| 26 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-02:v1.0.1-rc1 dockerfiles/milestone_seed_e9a3625_1_sub-02/
|
| 27 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-02:v1.0
|
| 28 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 29 |
+
|
| 30 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 31 |
+
FROM ${SOURCE_IMAGE}
|
| 32 |
+
|
| 33 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 34 |
+
set -eu
|
| 35 |
+
cd /testbed
|
| 36 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 37 |
+
NM=/testbed/node_modules
|
| 38 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 39 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 40 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 41 |
+
rm -rf "${2:?}/$3"
|
| 42 |
+
cp -a "$src" "$2/$3"
|
| 43 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 44 |
+
}
|
| 45 |
+
pv() { node -e '
|
| 46 |
+
const{createRequire}=require("module");const path=require("path");
|
| 47 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 48 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 49 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 50 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 51 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 52 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 53 |
+
# Restore point: the image's SHIPPED default git state (NOT assumed to be the
|
| 54 |
+
# start tag — sub-chain images ship env-patch commits; preserve exactly).
|
| 55 |
+
if BR=$(git symbolic-ref -q --short HEAD); then RESTORE="$BR"; else RESTORE=$(git rev-parse HEAD); fi
|
| 56 |
+
echo "ENVFIX[milestone_seed_e9a3625_1_sub-02]: shipped state = $RESTORE ($(git rev-parse --short HEAD))"
|
| 57 |
+
git checkout -q -f milestone-milestone_seed_e9a3625_1_sub-02-end
|
| 58 |
+
# 599112e v1.0 precedent: materialize the END tag's frozen lockfile from the
|
| 59 |
+
# sealed union cache (coverage pre-verified: 1762/1762 resp. 1761/1761 entries).
|
| 60 |
+
yarn install --offline --frozen-lockfile
|
| 61 |
+
# The END manifest dropped linkify-element, so the frozen install prunes it —
|
| 62 |
+
# but the CTE envelope requires it (the mbf/05df321 D-class direction).
|
| 63 |
+
# Re-add the exact base-lockfile payload, store-surgery, no manifest edits.
|
| 64 |
+
if res linkify-element; then
|
| 65 |
+
echo "ENVFIX-INFO[milestone_seed_e9a3625_1_sub-02]: linkify-element=$(pv linkify-element) survived install (untouched)"
|
| 66 |
+
else
|
| 67 |
+
echo "ENVFIX-ADD: linkify-element@4.2.0 (END manifest dropped it; envelope PRESENCE on rebuilt tree, ruling B-prime)"
|
| 68 |
+
cpkg npm-linkify-element-4.2.0-fb5c6d47576487a463fd22a0cc889e15833aa943-integrity "$NM" linkify-element
|
| 69 |
+
res linkifyjs || cpkg npm-linkifyjs-4.2.0-9dd30222b9cbabec9c950e725ec00031c7fa3f08-integrity "$NM/linkify-element/node_modules" linkifyjs
|
| 70 |
+
fi
|
| 71 |
+
git checkout -q -f "$RESTORE"
|
| 72 |
+
git status --porcelain > /tmp/envfix-st && test ! -s /tmp/envfix-st && rm -f /tmp/envfix-st
|
| 73 |
+
echo "ENVFIX-ACTION[milestone_seed_e9a3625_1_sub-02]: full offline install of END-vintage lockfile + linkify-element@4.2.0 envelope re-add"
|
| 74 |
+
EOS
|
| 75 |
+
|
| 76 |
+
RUN <<'EOS'
|
| 77 |
+
set -eu
|
| 78 |
+
cd /testbed
|
| 79 |
+
# Codex finding #6: both END locks carry '@vector-im/matrix-wysiwyg-wasm@link:'
|
| 80 |
+
# (builder-machine path). yarn v1 installs link: as a symlink; verify the
|
| 81 |
+
# resolved target REALLY exists; if dead, repair from the payload embedded in
|
| 82 |
+
# the published @vector-im/matrix-wysiwyg package. Loud either way.
|
| 83 |
+
if node -e '
|
| 84 |
+
const{createRequire}=require("module");const fs=require("fs");const path=require("path");
|
| 85 |
+
const r=createRequire("/testbed/x.js");
|
| 86 |
+
function pdir(n){let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}
|
| 89 |
+
return d;}
|
| 90 |
+
const rw=createRequire(path.join(pdir("@vector-im/matrix-wysiwyg"),"package.json"));
|
| 91 |
+
const t=rw.resolve("@vector-im/matrix-wysiwyg-wasm");
|
| 92 |
+
fs.statSync(fs.realpathSync(t));
|
| 93 |
+
console.log("ENVFIX-WASM: live target -> "+fs.realpathSync(t));'
|
| 94 |
+
then
|
| 95 |
+
echo "ENVFIX-WASM-ASSERT[milestone_seed_e9a3625_1_sub-02] OK (link target live)"
|
| 96 |
+
else
|
| 97 |
+
echo "ENVFIX-WASM: dead or unresolvable link — repairing from embedded payload"
|
| 98 |
+
WD=$(node -e 'const{createRequire}=require("module");const path=require("path");const r=createRequire("/testbed/x.js");let d;try{d=path.dirname(r.resolve("@vector-im/matrix-wysiwyg/package.json"));}catch(e){let m=r.resolve("@vector-im/matrix-wysiwyg");d=path.dirname(m);while(d!=="/"&&!d.endsWith("node_modules/@vector-im/matrix-wysiwyg"))d=path.dirname(d);}console.log(d)')
|
| 99 |
+
SRCW=""
|
| 100 |
+
for c in "$WD/bindings/wysiwyg-wasm" "$WD/../matrix-wysiwyg-wasm"; do
|
| 101 |
+
[ -d "$c" ] && SRCW="$c" && break
|
| 102 |
+
done
|
| 103 |
+
[ -n "$SRCW" ] || { echo "ENVFIX-FATAL[milestone_seed_e9a3625_1_sub-02]: no embedded wysiwyg-wasm payload found"; exit 1; }
|
| 104 |
+
rm -rf /testbed/node_modules/@vector-im/matrix-wysiwyg-wasm
|
| 105 |
+
cp -aL "$SRCW" /testbed/node_modules/@vector-im/matrix-wysiwyg-wasm
|
| 106 |
+
node -e '
|
| 107 |
+
const{createRequire}=require("module");const fs=require("fs");const path=require("path");
|
| 108 |
+
const r=createRequire("/testbed/x.js");
|
| 109 |
+
function pdir(n){let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 110 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 111 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}
|
| 112 |
+
return d;}
|
| 113 |
+
const rw=createRequire(path.join(pdir("@vector-im/matrix-wysiwyg"),"package.json"));
|
| 114 |
+
const t=rw.resolve("@vector-im/matrix-wysiwyg-wasm");
|
| 115 |
+
fs.statSync(fs.realpathSync(t));
|
| 116 |
+
console.log("ENVFIX-WASM-ASSERT[milestone_seed_e9a3625_1_sub-02] OK (repaired, target -> "+fs.realpathSync(t)+")");'
|
| 117 |
+
fi
|
| 118 |
+
EOS
|
| 119 |
+
|
| 120 |
+
RUN <<'EOS'
|
| 121 |
+
set -eu
|
| 122 |
+
cd /testbed
|
| 123 |
+
node <<'EOJS'
|
| 124 |
+
const{createRequire}=require('module');const path=require('path');
|
| 125 |
+
const r=createRequire('/testbed/x.js');
|
| 126 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 127 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 128 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 129 |
+
return require(path.join(d,'package.json')).version;}
|
| 130 |
+
const hrp=pv('html-react-parser');
|
| 131 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 132 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 133 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 134 |
+
require(r.resolve('linkify-element'));
|
| 135 |
+
require(r.resolve('linkifyjs'));
|
| 136 |
+
// compound version comes from this milestone's own frozen lockfile (4.0.1); logged above
|
| 137 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_e9a3625_1_sub-02] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 138 |
+
EOJS
|
| 139 |
+
EOS
|
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_e9a3625_1_sub-03
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology (env-deps-audit Phase 4, 2026-08-17): the v1.0 image preserves base
|
| 8 |
+
# v1.11.95 node_modules and never runs any install; 26 contract packages are
|
| 9 |
+
# missing (html-react-parser@5.2.2 + its transitive closure, patch-package
|
| 10 |
+
# chain, @element-hq/element-web-playwright-common) and 95 more drift from the
|
| 11 |
+
# declared versions. 54 A-class cells; golden baseline silently zeroed the
|
| 12 |
+
# three hrp suites.
|
| 13 |
+
#
|
| 14 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 15 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 16 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 17 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 18 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 19 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 20 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 21 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 22 |
+
#
|
| 23 |
+
# Build (BuildKit, offline):
|
| 24 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 25 |
+
# -f dockerfiles/milestone_seed_e9a3625_1_sub-03/Dockerfile.v1.0.1 \
|
| 26 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-03:v1.0.1-rc1 dockerfiles/milestone_seed_e9a3625_1_sub-03/
|
| 27 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_e9a3625_1_sub-03:v1.0
|
| 28 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 29 |
+
|
| 30 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 31 |
+
FROM ${SOURCE_IMAGE}
|
| 32 |
+
|
| 33 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 34 |
+
set -eu
|
| 35 |
+
cd /testbed
|
| 36 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 37 |
+
NM=/testbed/node_modules
|
| 38 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 39 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 40 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 41 |
+
rm -rf "${2:?}/$3"
|
| 42 |
+
cp -a "$src" "$2/$3"
|
| 43 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 44 |
+
}
|
| 45 |
+
pv() { node -e '
|
| 46 |
+
const{createRequire}=require("module");const path=require("path");
|
| 47 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 48 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 49 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 50 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 51 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 52 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 53 |
+
# Restore point: the image's SHIPPED default git state (NOT assumed to be the
|
| 54 |
+
# start tag — sub-chain images ship env-patch commits; preserve exactly).
|
| 55 |
+
if BR=$(git symbolic-ref -q --short HEAD); then RESTORE="$BR"; else RESTORE=$(git rev-parse HEAD); fi
|
| 56 |
+
echo "ENVFIX[milestone_seed_e9a3625_1_sub-03]: shipped state = $RESTORE ($(git rev-parse --short HEAD))"
|
| 57 |
+
git checkout -q -f milestone-milestone_seed_e9a3625_1_sub-03-end
|
| 58 |
+
# 599112e v1.0 precedent: materialize the END tag's frozen lockfile from the
|
| 59 |
+
# sealed union cache (coverage pre-verified: 1762/1762 resp. 1761/1761 entries).
|
| 60 |
+
yarn install --offline --frozen-lockfile
|
| 61 |
+
# The END manifest dropped linkify-element, so the frozen install prunes it —
|
| 62 |
+
# but the CTE envelope requires it (the mbf/05df321 D-class direction).
|
| 63 |
+
# Re-add the exact base-lockfile payload, store-surgery, no manifest edits.
|
| 64 |
+
if res linkify-element; then
|
| 65 |
+
echo "ENVFIX-INFO[milestone_seed_e9a3625_1_sub-03]: linkify-element=$(pv linkify-element) survived install (untouched)"
|
| 66 |
+
else
|
| 67 |
+
echo "ENVFIX-ADD: linkify-element@4.2.0 (END manifest dropped it; envelope PRESENCE on rebuilt tree, ruling B-prime)"
|
| 68 |
+
cpkg npm-linkify-element-4.2.0-fb5c6d47576487a463fd22a0cc889e15833aa943-integrity "$NM" linkify-element
|
| 69 |
+
res linkifyjs || cpkg npm-linkifyjs-4.2.0-9dd30222b9cbabec9c950e725ec00031c7fa3f08-integrity "$NM/linkify-element/node_modules" linkifyjs
|
| 70 |
+
fi
|
| 71 |
+
git checkout -q -f "$RESTORE"
|
| 72 |
+
git status --porcelain > /tmp/envfix-st && test ! -s /tmp/envfix-st && rm -f /tmp/envfix-st
|
| 73 |
+
echo "ENVFIX-ACTION[milestone_seed_e9a3625_1_sub-03]: full offline install of END-vintage lockfile + linkify-element@4.2.0 envelope re-add"
|
| 74 |
+
EOS
|
| 75 |
+
|
| 76 |
+
RUN <<'EOS'
|
| 77 |
+
set -eu
|
| 78 |
+
cd /testbed
|
| 79 |
+
# Codex finding #6: both END locks carry '@vector-im/matrix-wysiwyg-wasm@link:'
|
| 80 |
+
# (builder-machine path). yarn v1 installs link: as a symlink; verify the
|
| 81 |
+
# resolved target REALLY exists; if dead, repair from the payload embedded in
|
| 82 |
+
# the published @vector-im/matrix-wysiwyg package. Loud either way.
|
| 83 |
+
if node -e '
|
| 84 |
+
const{createRequire}=require("module");const fs=require("fs");const path=require("path");
|
| 85 |
+
const r=createRequire("/testbed/x.js");
|
| 86 |
+
function pdir(n){let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}
|
| 89 |
+
return d;}
|
| 90 |
+
const rw=createRequire(path.join(pdir("@vector-im/matrix-wysiwyg"),"package.json"));
|
| 91 |
+
const t=rw.resolve("@vector-im/matrix-wysiwyg-wasm");
|
| 92 |
+
fs.statSync(fs.realpathSync(t));
|
| 93 |
+
console.log("ENVFIX-WASM: live target -> "+fs.realpathSync(t));'
|
| 94 |
+
then
|
| 95 |
+
echo "ENVFIX-WASM-ASSERT[milestone_seed_e9a3625_1_sub-03] OK (link target live)"
|
| 96 |
+
else
|
| 97 |
+
echo "ENVFIX-WASM: dead or unresolvable link — repairing from embedded payload"
|
| 98 |
+
WD=$(node -e 'const{createRequire}=require("module");const path=require("path");const r=createRequire("/testbed/x.js");let d;try{d=path.dirname(r.resolve("@vector-im/matrix-wysiwyg/package.json"));}catch(e){let m=r.resolve("@vector-im/matrix-wysiwyg");d=path.dirname(m);while(d!=="/"&&!d.endsWith("node_modules/@vector-im/matrix-wysiwyg"))d=path.dirname(d);}console.log(d)')
|
| 99 |
+
SRCW=""
|
| 100 |
+
for c in "$WD/bindings/wysiwyg-wasm" "$WD/../matrix-wysiwyg-wasm"; do
|
| 101 |
+
[ -d "$c" ] && SRCW="$c" && break
|
| 102 |
+
done
|
| 103 |
+
[ -n "$SRCW" ] || { echo "ENVFIX-FATAL[milestone_seed_e9a3625_1_sub-03]: no embedded wysiwyg-wasm payload found"; exit 1; }
|
| 104 |
+
rm -rf /testbed/node_modules/@vector-im/matrix-wysiwyg-wasm
|
| 105 |
+
cp -aL "$SRCW" /testbed/node_modules/@vector-im/matrix-wysiwyg-wasm
|
| 106 |
+
node -e '
|
| 107 |
+
const{createRequire}=require("module");const fs=require("fs");const path=require("path");
|
| 108 |
+
const r=createRequire("/testbed/x.js");
|
| 109 |
+
function pdir(n){let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 110 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 111 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}
|
| 112 |
+
return d;}
|
| 113 |
+
const rw=createRequire(path.join(pdir("@vector-im/matrix-wysiwyg"),"package.json"));
|
| 114 |
+
const t=rw.resolve("@vector-im/matrix-wysiwyg-wasm");
|
| 115 |
+
fs.statSync(fs.realpathSync(t));
|
| 116 |
+
console.log("ENVFIX-WASM-ASSERT[milestone_seed_e9a3625_1_sub-03] OK (repaired, target -> "+fs.realpathSync(t)+")");'
|
| 117 |
+
fi
|
| 118 |
+
EOS
|
| 119 |
+
|
| 120 |
+
RUN <<'EOS'
|
| 121 |
+
set -eu
|
| 122 |
+
cd /testbed
|
| 123 |
+
node <<'EOJS'
|
| 124 |
+
const{createRequire}=require('module');const path=require('path');
|
| 125 |
+
const r=createRequire('/testbed/x.js');
|
| 126 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 127 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 128 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 129 |
+
return require(path.join(d,'package.json')).version;}
|
| 130 |
+
const hrp=pv('html-react-parser');
|
| 131 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 132 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 133 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 134 |
+
require(r.resolve('linkify-element'));
|
| 135 |
+
require(r.resolve('linkifyjs'));
|
| 136 |
+
// own-contract images (e662c19/7ff1fd2): exact 4.0.1 + reality-based icon checks
|
| 137 |
+
const cpd=pv('@vector-im/compound-design-tokens');
|
| 138 |
+
if(cpd!=='4.0.1')throw new Error('assert compound: '+cpd);
|
| 139 |
+
const icons=require(r.resolve('@vector-im/compound-design-tokens/assets/web/icons'));
|
| 140 |
+
if(!('VisibilityOffIcon' in icons))throw new Error('assert compound icons index: VisibilityOffIcon missing');
|
| 141 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_e9a3625_1_sub-03] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 142 |
+
EOJS
|
| 143 |
+
EOS
|
| 144 |
+
|
| 145 |
+
RUN <<'EOS'
|
| 146 |
+
set -eu
|
| 147 |
+
cd /testbed
|
| 148 |
+
node <<'EOJS'
|
| 149 |
+
const{createRequire}=require('module');const r=createRequire('/testbed/x.js');
|
| 150 |
+
// contract heads of the 26-missing set (full set guaranteed by the frozen-lockfile install)
|
| 151 |
+
for (const n of ['patch-package','@element-hq/element-web-playwright-common','lodash-es',
|
| 152 |
+
'fs-extra','html-dom-parser','style-to-object','react-string-replace'])
|
| 153 |
+
r.resolve(n);
|
| 154 |
+
console.log('ENVFIX-ASSERT[milestone_seed_e9a3625_1_sub-03] OK contract-head packages resolve');
|
| 155 |
+
EOJS
|
| 156 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_f59af37_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_f59af37_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_f59af37_1:v1.0.1-rc1 dockerfiles/milestone_seed_f59af37_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_f59af37_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_f59af37_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_f59af37_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_f59af37_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_f59af37_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1.4
|
| 2 |
+
# v1.0.1 ENV-PATCH overlay — milestone_seed_fba5938_1
|
| 3 |
+
# Campaign: envfix_v101_20260818 (element-web env-deps repair, Batch 0)
|
| 4 |
+
# Authored in reeval scratch; to be committed on data-repo branch envfix-v1.0.1
|
| 5 |
+
# (worktree) and built from there at drain time. docs/image-patching.md SOP.
|
| 6 |
+
#
|
| 7 |
+
# Pathology: CTE-envelope deficit (policy §6.0, USER-DECIDED 2026-08-17).
|
| 8 |
+
# This image's node_modules predates the benchmark closure's html-react-parser
|
| 9 |
+
# migration: agent snapshots legitimately carrying later-vintage src
|
| 10 |
+
# (EventContentBody.tsx / HtmlUtils.tsx import html-react-parser) fail jest
|
| 11 |
+
# collection on this image ("Cannot find module ..." class-D cells).
|
| 12 |
+
# Repair (ruling B-prime): presence-only envelope — nested store-surgery of
|
| 13 |
+
# the hrp 13-payload closure from the sealed union cache. linkify-element and
|
| 14 |
+
# compound-design-tokens are UNTOUCHED here (presence semantics / no
|
| 15 |
+
# own-contract pin). No manifest edits, no re-resolution.
|
| 16 |
+
#
|
| 17 |
+
# Eval-side only: base/base-offline/quarantine/prompts untouched; packages come
|
| 18 |
+
# exclusively from the sealed union yarn cache of CLOSURE_IMAGE (coverage
|
| 19 |
+
# evidence: evidence/cache-coverage-crosscheck.json). Deviation from the
|
| 20 |
+
# 'yarn add --offline' instruction, recorded for review: yarn-add re-resolves
|
| 21 |
+
# the whole tree and on stale-vintage images churns 60-90 packages (golden
|
| 22 |
+
# risk + offline-resolution risk); this overlay instead copies the exact
|
| 23 |
+
# lockfile-pinned payloads (integrity hash embedded in each cache dir name)
|
| 24 |
+
# with correct nesting — minimal diff, node_modules only, same asserts.
|
| 25 |
+
#
|
| 26 |
+
# Build (BuildKit, offline):
|
| 27 |
+
# DOCKER_BUILDKIT=1 docker build --pull=false --network=none \
|
| 28 |
+
# -f dockerfiles/milestone_seed_fba5938_1/Dockerfile.v1.0.1 \
|
| 29 |
+
# -t swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_fba5938_1:v1.0.1-rc1 dockerfiles/milestone_seed_fba5938_1/
|
| 30 |
+
ARG SOURCE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__milestone_seed_fba5938_1:v1.0
|
| 31 |
+
ARG CLOSURE_IMAGE=swe-milestone/element-hq_element-web_v1.11.95_v1.11.97__base-offline:v1.0
|
| 32 |
+
|
| 33 |
+
FROM ${CLOSURE_IMAGE} AS closure
|
| 34 |
+
FROM ${SOURCE_IMAGE}
|
| 35 |
+
|
| 36 |
+
RUN --mount=type=bind,from=closure,source=/usr/local/share/.cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6,readonly <<'EOS'
|
| 37 |
+
set -eu
|
| 38 |
+
cd /testbed
|
| 39 |
+
C=/usr/local/share/.cache/yarn/v6
|
| 40 |
+
NM=/testbed/node_modules
|
| 41 |
+
cpkg() { # cpkg <cache-dir> <dest-parent> <name>
|
| 42 |
+
src="$C/$1/node_modules/$3"; test -d "$src" || { echo "ENVFIX-FATAL: cache payload missing: $1/$3"; exit 1; }
|
| 43 |
+
mkdir -p "$2/$(dirname "$3")" 2>/dev/null || true
|
| 44 |
+
rm -rf "${2:?}/$3"
|
| 45 |
+
cp -a "$src" "$2/$3"
|
| 46 |
+
echo "ENVFIX-COPY: $3@$(node -p "require('$2/$3/package.json').version") -> $2"
|
| 47 |
+
}
|
| 48 |
+
pv() { node -e '
|
| 49 |
+
const{createRequire}=require("module");const path=require("path");
|
| 50 |
+
const r=createRequire("/testbed/x.js");const n=process.argv[1];
|
| 51 |
+
let d;try{d=path.dirname(r.resolve(n+"/package.json"));}
|
| 52 |
+
catch(e){try{let m=r.resolve(n);d=path.dirname(m);
|
| 53 |
+
while(d!=="/"&&!d.endsWith("node_modules/"+n))d=path.dirname(d);}catch(e2){console.log("ABSENT");process.exit(0);}}
|
| 54 |
+
console.log(require(path.join(d,"package.json")).version)' "$1" 2>/dev/null || echo ABSENT; }
|
| 55 |
+
res() { node -e 'const{createRequire}=require("module");createRequire("/testbed/x.js").resolve(process.argv[1])' "$1" >/dev/null 2>&1; }
|
| 56 |
+
ACTIONS=""
|
| 57 |
+
if [ "$(pv html-react-parser)" = "5.2.2" ]; then
|
| 58 |
+
echo "ENVFIX-SKIP: html-react-parser already 5.2.2"
|
| 59 |
+
else
|
| 60 |
+
cpkg npm-html-react-parser-5.2.2-a4159c14f08c06280ff793ce35f872c2283227cb-integrity "$NM" html-react-parser
|
| 61 |
+
cpkg npm-html-dom-parser-5.0.13-36b25b3ad05dc71741e9cd200ff276cdf8e3831d-integrity "$NM/html-react-parser/node_modules" html-dom-parser
|
| 62 |
+
cpkg npm-react-property-2.0.2-d5ac9e244cef564880a610bc8d868bd6f60fdda6-integrity "$NM/html-react-parser/node_modules" react-property
|
| 63 |
+
cpkg npm-style-to-js-1.1.16-e6bd6cd29e250bcf8fa5e6591d07ced7575dbe7a-integrity "$NM/html-react-parser/node_modules" style-to-js
|
| 64 |
+
cpkg npm-style-to-object-1.0.8-67a29bca47eaa587db18118d68f9d95955e81292-integrity "$NM/html-react-parser/node_modules" style-to-object
|
| 65 |
+
cpkg npm-inline-style-parser-0.2.4-f4af5fe72e612839fcd453d989a586566d695f22-integrity "$NM/html-react-parser/node_modules" inline-style-parser
|
| 66 |
+
cpkg npm-domhandler-5.0.3-cc385f7f751f1d1fc650c21374804254538c7d31-integrity "$NM/html-react-parser/node_modules" domhandler
|
| 67 |
+
cpkg npm-domelementtype-2.3.0-5c45e8e869952626331d7aab326d01daf65d589d-integrity "$NM/html-react-parser/node_modules" domelementtype
|
| 68 |
+
cpkg npm-domutils-3.2.2-edbfe2b668b0c1d97c24baf0f1062b132221bc78-integrity "$NM/html-react-parser/node_modules" domutils
|
| 69 |
+
cpkg npm-dom-serializer-2.0.0-e41b802e1eedf9f6cae183ce5e622d789d7d8e53-integrity "$NM/html-react-parser/node_modules" dom-serializer
|
| 70 |
+
cpkg npm-entities-4.5.0-5d268ea5e7113ec74c4d033b79ea5a35a488fb48-integrity "$NM/html-react-parser/node_modules" entities
|
| 71 |
+
cpkg npm-htmlparser2-10.0.0-77ad249037b66bf8cc99c6e286ef73b83aeb621d-integrity "$NM/html-react-parser/node_modules" htmlparser2
|
| 72 |
+
cpkg npm-entities-6.0.0-09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51-integrity "$NM/html-react-parser/node_modules/htmlparser2/node_modules" entities
|
| 73 |
+
ACTIONS="$ACTIONS hrp-closure@5.2.2"
|
| 74 |
+
fi
|
| 75 |
+
echo "ENVFIX-INFO[milestone_seed_fba5938_1]: linkify-element=$(pv linkify-element) linkifyjs=$(pv linkifyjs) (untouched; presence semantics, ruling B-prime)"
|
| 76 |
+
echo "ENVFIX-INFO[milestone_seed_fba5938_1]: compound-design-tokens=$(pv @vector-im/compound-design-tokens) (untouched; no own-contract pin, ruling B-prime)"
|
| 77 |
+
echo "ENVFIX-ACTION[milestone_seed_fba5938_1]:${ACTIONS:- no-op (all envelope requirements already satisfied)}"
|
| 78 |
+
EOS
|
| 79 |
+
|
| 80 |
+
RUN <<'EOS'
|
| 81 |
+
set -eu
|
| 82 |
+
cd /testbed
|
| 83 |
+
node <<'EOJS'
|
| 84 |
+
const{createRequire}=require('module');const path=require('path');
|
| 85 |
+
const r=createRequire('/testbed/x.js');
|
| 86 |
+
function pv(n){let d;try{d=path.dirname(r.resolve(n+'/package.json'));}
|
| 87 |
+
catch(e){let m=r.resolve(n);d=path.dirname(m);
|
| 88 |
+
while(d!=='/'&&!d.endsWith('node_modules/'+n))d=path.dirname(d);}
|
| 89 |
+
return require(path.join(d,'package.json')).version;}
|
| 90 |
+
const hrp=pv('html-react-parser');
|
| 91 |
+
if(hrp!=='5.2.2')throw new Error('assert hrp: '+hrp);
|
| 92 |
+
require(r.resolve('html-react-parser')); // full transitive load
|
| 93 |
+
// linkify: PRESENCE semantics (ruling B-prime) — resolvable + loadable, any version
|
| 94 |
+
require(r.resolve('linkify-element'));
|
| 95 |
+
require(r.resolve('linkifyjs'));
|
| 96 |
+
// compound untouched on this image (no own-contract pin)
|
| 97 |
+
console.log(`ENVFIX-ASSERT[milestone_seed_fba5938_1] OK hrp=5.2.2 linkify=${pv('linkify-element')}(presence) compound=${pv('@vector-im/compound-design-tokens')}`);
|
| 98 |
+
EOJS
|
| 99 |
+
EOS
|