Repository navigation
v0.6.2 bridge correctness and responsive visual hardening - #43
Merged
Merged
Conversation
Reconcile the local checkout against origin/main before editing. The
transcript-tail RecoveryBench GPU run is absent, not stale-active: no
python process exists and nvidia-smi shows no compute client, so no
current artifact was ever at risk. The prior session left one
uncommitted, half-wired draft in bridge/config.py; it is archived
verbatim under .takeover-archive-20260804/ and reverted, and its useful
ideas are carried forward by the audit module that follows.
Add regressions that fail against unmodified code and pin both confirmed
defects:
- an unresolved ${...} value in a mapped field is accepted, producing a
recipe containing a literal ${MODEL_PATH} while the report claims
status=accepted and generated_recipe_validated=true;
- import and dataset outputs use shared names and are published
non-transactionally, so two stems collide and a mid-run failure can
pair one invocation's report with another's artifact.
44 failed, 11 passed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Workstream A -- one recursive, shared audit in bridge/interpolation.py,
applied at every boundary the importer has:
- source fields, classified so exact, derived and
requires_user_confirmation values fail closed while informational
values are labelled resolution_status=unresolved_informational_only
and stay inside the report;
- explicit CLI choices (environment, teacher model/adapter, loss
profile, schedule mapping), audited before any path is reserved;
- the generated recipe, re-scanned before publication, plus a byte
check on the rendered YAML.
Detection is conservative: any ${ in a reachable string is a finding,
including unterminated and nested forms, and nothing is ever resolved
from the environment. Finite scientific notation such as 1e-5 keeps
working; NaN and infinity stay rejected. No new runtime dependency.
Workstream B -- bridge/publish.py gives each invocation a stem-specific
target family, an exclusive per-stem reservation, a collision check that
runs before anything is modified, staging inside the destination so
publication is a same-filesystem rename, and restore-on-failure.
- import-verl publishes only <stem>.yaml or <stem>.template.yaml, plus
exactly one <stem>.import-report.json; the shared import-report.json
and imported.template.yaml names are gone.
- convert-dataset publishes <name>.parquet, its .miniverl.json sidecar
and .report.json as one family, so a mid-run failure can no longer
pair one invocation's report with another's Parquet, and a stale
sidecar cannot outlive the run that replaced it.
- Existing outputs are never replaced without an explicit --overwrite;
supplying --out does not imply it.
Both CLI commands gain --overwrite. The report now carries report_path
and an interpolation_audit block.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Workstream E -- bridge doctor no longer represents tokenizer filename and
digest presence as tokenizer compatibility. Four explicit levels replace
the single ok/fail flag:
not_present -> metadata_only -> loadable_local_snapshot
-> structural_identity_verified
A complete local snapshot is loaded with local_files_only=True and
trust_remote_code=False, its versioned structural identity is computed
with the existing tokenizer_structural_digest, and vocabulary size and
special-token identity are compared against the source manifest when the
bundle records one. Any mismatch fails closed. The network is never
contacted, which the deny_network fixture asserts. A metadata-only
directory names its missing components instead of claiming verification,
and `bridge doctor --require-tokenizer-load` fails unless a real local
load succeeded.
Note: the committed docs/generated/verl-bridge-smoke.json predates these
levels and is intentionally left byte-identical. Its bundle carries only
tokenizer_config.json, which the new code correctly calls metadata_only.
Workstream F -- privacy is reported per inspection scope:
portable_metadata_privacy: passed | failed
dataset_content_privacy: not_inspected | passed | failed
model_weight_privacy: not_inspected
not_inspected is never translated into passed, and the CLI says so.
`bridge doctor --scan-dataset-text` adds a bounded heuristic scan of
string-like Parquet fields for URL userinfo, private-key blocks, AWS key
ids, bearer tokens, credential assignments, absolute local paths and
repeatable --sentinel values. It reports detector category, split, column
and row index only -- never the matched text -- caps rows and bytes,
records whether it ran full or sampled, and never reads safetensors as
text.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Workstream C: metric coverage is no longer an SVG. Its content is tabular, its headers collided at desktop widths, and two of its columns repeated one identical value in every row. It is now an accessible responsive HTML table: real row/column semantics, headers that wrap, labelled cards below 760 px, and one column-level statement replacing six YES and six NOT RUN cells. The forest chart moves its alignment/utility legend into a dedicated footer band, away from the header and axis title, and prints every mean and seed in the left column instead of floating value labels inside the plot. The outcome matrix widens the method column so "offline soft distillation" no longer runs into the first metric, stacks each value above its bar, and moves the not-applicable marker into the last column. Both charts gain a real 390 px vertical layout selected through a picture element, not a scaled-down desktop canvas. assert_chart_suitability rejects a desktop canvas offered as a mobile figure and enforces a 14 px floor on mobile text. Workstream D: the gate measured every SVG standalone at 1400x1200 and derived readability from a constant 820 px, so the 390 px page was never actually measured; it also compared only data-role nodes, so untagged headers could overlap undetected. It now records each figure's real rendered box in the viewport under test, re-renders the SVG at exactly that width, and inspects every visible text node. It detects header-to-header and header-to-data overlap, label-to-mark occlusion, figures that failed to load, responsive table and card-label problems, and text below 11 px at 390 px. Reading currentSrc means an inactive picture branch is never measured and never counted as passing. tests/fixtures/visual/legacy-metric-coverage-matrix.svg preserves the v0.6.1 figure verbatim. The corrected gate rejects it at both the desktop and phone widths with an overlapping-text failure naming Sandbox endpoint and External safety. Two defects the gate cannot express were found by reading the actual screenshots and fixed: the coverage caption collapsed to one word per line in card mode, and the outcome-matrix values touched their own seed marks and the next column's bar. Workstream G: README, Chinese README, PYPI.md, docs/verl-bridge.md and the exported bundle README describe a verified artifact bridge at miniVERL-defined Level 3, keep launchable, distributed-execution and algorithm-parity status prominent, and document the new naming, overwrite, tokenizer-level and privacy-scope contracts. Raw HTML src values are not rewritten by MkDocs, so the new picture blocks use a parent-relative path where the page sits below the figures. The gate now fails on a figure that did not load, which is how that was caught. Every frozen result and the pinned bridge smoke record stay byte-identical. 1652 CPU tests pass at 85.77% coverage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Set the version to 0.6.2, date the CHANGELOG section and add its compare link, update CITATION.cff, regenerate PYPI.md pinned to blob/v0.6.2, and record release 0.6.2 with status validated in docs/generated/quality.json at 1652 CPU tests, 85.77 percent branch coverage, 5 GPU and 3 network. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DaoyuanLi2816
marked this pull request as ready for review
August 5, 2026 05:58
DaoyuanLi2816
added a commit
that referenced
this pull request
Aug 5, 2026
Reject unresolved interpolation everywhere it could become executable.
bridge/interpolation.py holds one recursive audit over strings, lists,
tuples and mappings, applied to source fields, to explicit CLI choices
before any path is reserved, and to the generated recipe plus its
rendered bytes before publication. exact, derived and
requires_user_confirmation fields fail closed; informational_only fields
may stay unresolved but are labelled unresolved_informational_only and
never reach executable output. Detection is conservative: any ${ in a
reachable string is a finding, and nothing is ever resolved from the
environment. Finite scientific notation such as 1e-5 keeps working; NaN
and infinity stay rejected. No new runtime dependency.
Publish bridge outputs transactionally. bridge/publish.py gives each
invocation a stem-specific target family, an exclusive per-stem
reservation, a collision check that runs before anything is modified,
staging inside the destination so publication is a same-filesystem
rename, and restore-on-failure. import-verl publishes <stem>.yaml or
<stem>.template.yaml plus exactly one <stem>.import-report.json;
convert-dataset publishes its Parquet, sidecar and report as one family.
Existing outputs are never replaced without an explicit --overwrite.
Report tokenizer verification levels truthfully: not_present,
metadata_only, loadable_local_snapshot, structural_identity_verified. A
complete snapshot is loaded with local_files_only=True and
trust_remote_code=False, and its structural digest, vocabulary size and
special tokens are compared against the source manifest where recorded.
Any mismatch fails closed and the network is never contacted.
bridge doctor --require-tokenizer-load refuses a metadata-only bundle.
Split privacy by inspection scope: portable_metadata_privacy,
dataset_content_privacy and model_weight_privacy are independent, and
not_inspected is never translated into passed.
bridge doctor --scan-dataset-text adds a bounded heuristic scan that
reports detector category, split, column and row index only, never the
matched text.
Rebuild the Alignment Lab visuals. Metric coverage becomes an accessible
responsive HTML table with one column-level scope statement, replacing
an SVG whose long headers collided and whose two rightmost columns
repeated one identical value in six rows. The forest chart moves its
legend to a dedicated footer band and prints every mean and seed in the
left column. The outcome matrix widens the method column and stacks each
value above its bar. Both charts gain real 390 px vertical layouts
selected through a picture element.
Make the visual gate measure reality. It previously checked every SVG
standalone at 1400x1200 and derived readability from a constant 820 px,
so the 390 px page was never actually measured, and it compared only
data-role nodes. It now records each figure's real rendered box in the
viewport under test, re-renders the SVG at exactly that width, and
inspects every visible text node for header-to-header and
header-to-data overlap, label-to-mark occlusion, figures that failed to
load, responsive table problems and text below 11 px at 390 px. A
preserved fixture of the old figure proves the corrected gate rejects it.
Documentation across README, README.zh-CN, PYPI.md, docs/verl-bridge.md
and the exported bundle README describes a verified artifact bridge at
miniVERL-defined Level 3 and keeps launchable, distributed-execution and
algorithm-parity status prominent.
Every frozen result and the pinned bridge smoke record remain
byte-identical. 1652 CPU tests pass at 85.77% branch coverage, with 5
GPU and 3 network tests green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A narrowly scoped bridge-correctness, transactional-output, tokenizer-verification,
privacy-scope and responsive-visual release. No new scientific experiment, no new
runtime claim, and every frozen result is byte-identical.
Reproduced defects, pinned by failing tests first
Against unmodified
64fd6d6, three new test files reported 44 failed, 11 passed:actor_rollout_ref.model.path: ${MODEL_PATH}produced
status: accepted,generated_recipe_validated: trueand a recipecontaining a literal
model_id: ${MODEL_PATH}.import-report.json; template runs writeimported.template.yaml. Two--outstems in one directory overwrite eachother, and dataset conversion replaced the Parquet before its sidecar/report.
A. Unresolved interpolation can no longer be executed
src/miniverl/bridge/interpolation.pyholds one recursive audit over strings,lists, tuples and mappings, applied at three boundaries: source fields, explicit
CLI choices (before any path is reserved), and the generated recipe plus its
rendered bytes before publication.
exact/derived/requires_user_confirmationfields fail closed.informational_onlyfields may stay unresolved but are labelledresolution_status: unresolved_informational_onlyand never reach executableoutput.
${is a finding, including unterminated andnested forms. N 8000 othing is ever resolved from the environment.
1e-5still parses; NaN and infinity stay rejected. No new runtime dependency.B. Stem-specific, transactional bridge outputs
src/miniverl/bridge/publish.pygives every invocation a stem-specific targetfamily, an exclusive per-stem reservation, a collision check that runs before
anything is modified, staging inside the destination and restore-on-failure.
--out recipes/foo.yamlpublishesfoo.yamlorfoo.template.yaml, plusexactly one
foo.import-report.json.convert-datasetpublishes its Parquet,.miniverl.jsonsidecar and.report.jsonas one family; a stale sidecar cannot outlive the run thatreplaced it.
--overwriteis required to replace an existing family; supplying--outnever implies it.
Covered by fault injection (report-write, artifact-write and mid-rename failure)
and by deterministic concurrency tests using barriers, not sleeps.
C + D. Visuals that are actually readable, and a gate that measures reality
Metric coverage is no longer an SVG. Its
Sandbox endpointandExternal safetyheaders collided at desktop widths and its two rightmost columns repeated one
identical value in six rows. It is now an accessible responsive HTML table with
one column-level scope statement and labelled cards below 760 px.
The forest chart moves its legend to a dedicated footer band and prints every
mean and seed in the left column. The outcome matrix widens the method column,
stacks each value above its bar, and moves the not-applicable marker to the last
column. Both charts gained real 390 px vertical layouts selected by
<picture>.scripts/check_docs_visual.pypreviously measured every SVG standalone at1400x1200 and derived readability from a constant 820 px, so the 390 px page was
never actually measured; it also compared only
[data-role]nodes. It nowrecords each figure's real rendered box in the viewport under test, re-renders
the SVG at exactly that width, and inspects every visible
<text>node.tests/fixtures/visual/legacy-metric-coverage-matrix.svgpreserves the v0.6.1figure verbatim. The corrected gate rejects it at both widths with
overlapping text: ['"Sandbox endpoint" x "External safety"'].Two defects the gate cannot express were found by reading the actual screenshots
and fixed: the coverage caption collapsed to one word per line in card mode, and
the outcome-matrix values touched their own seed marks and the next column's bar.
E + F. Truthful tokenizer levels and scoped privacy
Tokenizer verification is reported as
not_present,metadata_only,loadable_local_snapshotorstructural_identity_verified. A complete snapshotis loaded with
local_files_only=Trueandtrust_remote_code=False; structuraldigest, vocabulary size and special tokens are compared against the source
manifest when present, and any mismatch fails closed. The network is never
contacted, asserted through the
deny_networkfixture.bridge doctor --require-tokenizer-loadrefuses a metadata-only bundle.Privacy is reported per inspection scope, and
not_inspectedis never renderedas
passed:bridge doctor --scan-dataset-textadds a bounded heuristic scan reportingdetector category, split, column and row index only, never the matched text.
Evidence
mkdocs build --strict, Markdown/link checkpython -m buildandtwine checkpass; clean core and[bridge]installs report the release version with torch absent[dev,train]into a clean venv outside the checkout: 1652 passedKnown limitation, recorded not hidden
The 11 px readability floor at 390 px is not enforced for four figures that
predate this release and have no narrow layout:
consumer-runtime-v1-pareto.svg,cost-quality-pareto.svg,fresh-vs-frozen.svgandrecovery-success.svg. Theexemption is an explicit asserted set, is printed on every gate run, and fails the
gate if any other figure joins it. Redesigning those v0.3/v0.4 figures is out of
scope here.
docs/generated/verl-bridge-smoke.jsonis left byte-identical. It predates thetokenizer levels, and its bundle ships only
tokenizer_config.json, which thecurrent checker correctly classifies as
metadata_only.Issue #39 is untouched. No frozen study was rerun. No distributed verl execution
or OPD/PPO semantic parity is claimed.