Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
516 changes: 516 additions & 0 deletions research/h25-bounded-serializer/PACKAGE-CHECKSUMS.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions research/h25-bounded-serializer/PUBLICATION-SCOPE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"base_commit": "a7638a4ce2a29947457ae8d6bf8cd70a234dfeac",
"complete_physical_cost_closure": false,
"external_component_manifest_sha256": "5cbf632753d81558487f453e2ac9b92a02a0b26c0f6da59b28c71c6db415ae1e",
"final_metadata_publication_boundary": "OPEN_NOT_ZERO",
"finite_artifact_bytes": 9417,
"frozen_stage_file_mode": "0444",
"full_caller_validated": false,
"local_reference_mapping": {
"review/": "reviews/",
"serializer/": "component/"
},
"normal_controls_accepted": 70,
"optimized_controls_accepted": 70,
"pending": "Complete physical cost closure, genuine complete H25 caller and representative performance validation.",
"performance_gain_measured": false,
"public_git_mode": "100644",
"runtime_executed": true,
"schema": "h25-serializer-finite-publication-v2",
"source_accepted": true,
"source_commit": "5781edb23484619c63fdd4271abaeb72d1b432f4"
}
31 changes: 31 additions & 0 deletions research/h25-bounded-serializer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Bounded H25 serializer: source and retained finite validation

This package extracts the reviewed bounded serializer and its unchanged 70-case control suite into a standalone finite consumer. The candidate stages exact canonical JSON in bounded chunks, verifies complete hashes and sizes, and publishes final artifacts only after its checks. It retains the original eager writer as a separate reference.

The first incremental commit preserved the component and independent source reviews. This second commit adds the first admitted finite results and the earlier pre-import custody failure. Independent review accepts all 70 normal controls and all 70 optimized controls, plus exact equality of the three finite artifacts. The small baseline/candidate pair shows no demonstrated saving. Complete physical cost closure, full H25 caller validation and representative performance remain open. Authorship and review were AI-assisted with GPT-6.1-sol high agents; independent human review is not claimed.

## Contents and source integrity

`component/` is the exact frozen 22-file source package, including its external-pinned SOURCE-PINS.json. `reviews/` preserves the independent reviews verbatim. Their local paths, previous proposal labels and original status strings are historical provenance; this README supplies current publication scope. The component manifest SHA256 is `5cbf632753d81558487f453e2ac9b92a02a0b26c0f6da59b28c71c6db415ae1e`. The candidate, controls and five extracted reference blocks preserve exact predecessor bytes. Scientific/native modules in component/provenance are reference material and are never imported by this finite consumer.

Git stores these as ordinary 100644 source files. Frozen local verification stages restore the declared 0444 file/0555 directory modes before custody checks; Git's mode representation is not a claim that a normal checkout is an immutable stage. PACKAGE-CHECKSUMS.json pins all other files in this publication commit, including the preserved component manifest and reviews.

## Validation and incremental commits

Source commit `5781edb23484619c63fdd4271abaeb72d1b432f4` remains intact in history. The second additive commit preserves complete raw finite-run bundles and independent review in `validation/`, including the first failure and charged cost. Read [the independent outcome](validation/reviews/PUBLIC-OUTCOME-v2.md) and [evidence format/replay boundaries](validation/README.md).

Normal and optimized modes each passed the exact 70 ordered cases. Separate baseline and candidate consumers with 2048 support rows produced identical 22-byte result, 9366-byte witness and 29-byte ordered rank trace. Baseline outer wall/CPU/peak RSS were 0.26 s / 0.24 s / 20168 KiB; candidate observations were 0.27 s / 0.25 s / 22012 KiB. These single rounded observations do not support a repeatable regression magnitude or a performance gain. This finite fixture is not the complete H25 workload.

The retained first failure occurred before target import because the runtime inventory omitted the resolved system sitecustomize origin. One source repair was independently accepted and a distinct immutable stage admitted. The four corrected operations each ran once; no test or timing was rerolled. All failures remain charged. Existing policy usage reached 75.750533479 / 2400 seconds. Complete physical preparation, independent readback and final metadata/publication costs remain unmeasured and OPEN_NOT_ZERO.

There is no executable CI replay hook. Hosted planning checks do not establish local control or performance success. Original complete caller, typed/stdout/certificate/ordered-rank/complement equality and full wall/CPU/peak-memory qualification remain open.

## Open next questions

1. How does the bounded writer behave on the genuine complete H25 caller and witness? Start with a source-pinned representative route and complete validation/resource bill; this finite fixture cannot answer it.
2. Can final publication semantics be preserved with less duplicate IO? The current candidate pays staging plus final copying and hashing. Any change needs its own failure/cleanup review.
3. How should complete preparation, independent readback and final metadata-publication costs be measured? Their unmeasured boundary keeps F7 partial; nominal administrative charges are not physical measurements.

## Provenance, credit and license

Preserves the H25 verification/bookkeeping lineage and original source attribution, including [PR6029](https://github.com/CrocSwap/integer-mult-bounds/pull/6029), the earlier verification work [PR5864](https://github.com/CrocSwap/integer-mult-bounds/pull/5864), and the retained source-bound/reference conventions of CrocSwap/integer-mult-bounds and its contributors. The published bounded-log component [PR6316](https://github.com/CrocSwap/integer-mult-bounds/pull/6316) supplies the separate guard precedent. The three remaining cache candidates remain independently handed off in [PR6321](https://github.com/CrocSwap/integer-mult-bounds/pull/6321); this component does not close them. Prepared for Clear1nsight with substantial OpenAI Codex assistance, using GPT-6.1-sol high author/reviewer agents. Apache-2.0 under the repository license. No mathematical construction, selected-frontier or kappa change.
76 changes: 76 additions & 0 deletions research/h25-bounded-serializer/component/BILL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"schema": "h25-standalone-serializer-cost-bill-v1",
"status": "PREDECLARED_SOURCE_ONLY_NO_MEASUREMENT",
"guarded_budget": {
"owner": "Parent serialized queue only, after independent concrete operation admission",
"new_budget_created": false,
"existing_round_total_seconds": 2400,
"existing_initial_feasibility_seconds": 600,
"per_command_seconds": 180,
"sampled_memory_bytes": 1073741824,
"historical_usage_at_authorization_seconds": 63.770533479,
"all_failures_charged": true,
"automatic_retry_or_reroll": false
},
"finite_control_bill": {
"modes": ["normal", "-O"],
"ordered_cases_per_mode": 70,
"ordered_cases_total": 140,
"case_cap_per_mode": 128,
"integer_bit_cap": 20000,
"retained_file_bytes_cap_per_mode_before_controls_json": 16777216,
"cap_exclusions_explicit": ["controls.json itself", "component-control-acceptance.json", "outer guard logs and independent receipts", "source package and authentication reads"],
"preserved_controls_source": "serialization_controls.py",
"fresh_inputs_and_roots": true,
"required_billing": [
"Interpreter startup and standard-library/local imports; loader/source/binary custody scans and all before/after hashes",
"Exact reference code-clone setup and separate expected globals, fresh independent fixture construction, canonical oracle derivation",
"Original full encoding/hash/write and candidate factory/preflight/encoding/stage/hash/copy/cleanup for every applicable case",
"Callback hooks, changed digit settings and restoration, all injected failures including close/manifest failures",
"Freshness traversals and expected checks at factory/entry/exit boundaries, every real artifact readback, comparison and byte census",
"All retained original/candidate success and failure files, controls.json, additive acceptance receipt, outer logs and independent observer outputs",
"Independent validation and every failure/timeout within existing total wall/CPU/memory budget"
],
"execution": "NOT_EXECUTED"
},
"finite_consumer_bill": {
"allowed_support_rows": [0, 1, 1024, 1025, 2048],
"rank_events": 3,
"comparison_protocol": "Predeclare same rows; independent fresh process/root per baseline/candidate; baseline actual original writer clone, candidate actual production writer; external independent validation required",
"common_paid_costs": ["fixture creation", "finite expected computation with complete canonical encodings and hashes", "exact writer clone", "output mkdir", "writer execution", "local readback of all 3 artifacts", "local hash/size checks", "JSON receipt serialization/write", "stdout and complete outer close/exit", "parent before/after custody and independent comparisons"],
"baseline_extra_costs": ["eager complete encodings retained together until original receipt and writes complete"],
"candidate_extra_costs": ["candidate import and factory", "whole preflight and repeated per-batch bounds", "row slices, Unicode/ASCII batch objects, views and punctuation", "three stage writes and stage hashes", "copy reads plus copy hashes and final writes", "freshness traversals and complete expected equality", "successful cleanup or retained failure artifacts/manifest"],
"finite_expected_values": "Derived from this finite fixture only, never represented as complete H25 EXPECTED or independent scientific validation",
"performance_scope": "No measurement; any later finite result is limited to this actual consumer"
},
"conditional_complete_three_artifact_bill": {
"condition": "Historical sizes only, conditional on genuine future complete equality; no artifact or caller read/execution in this author round",
"result_bytes": 527,
"witness_bytes": 58143622,
"rank_trace_bytes": 2674272,
"total_artifact_bytes": 60818421,
"baseline_final_write_bytes": 60818421,
"candidate_stage_write_bytes": 60818421,
"candidate_copy_read_bytes": 60818421,
"candidate_final_write_bytes": 60818421,
"candidate_total_write_bytes": 121636842,
"candidate_stage_hash_input_bytes": 60818421,
"candidate_copy_hash_input_bytes": 60818421,
"candidate_total_hash_input_bytes": 121636842,
"candidate_extra_full_copy_validation_read_bytes": 0,
"additional_independent_artifact_readback_bytes_per_complete_pass": 60818421,
"private_stage_disk_at_acceptance_bytes": 60818421,
"private_stage_plus_complete_final_disk_before_cleanup_bytes": 121636842,
"memory_boundary": "Eager witness input collections remain; bounded encoder batch/copy buffers do not imply a complete RSS bound or gain",
"unmeasured": ["wall time", "CPU including all children", "peak memory", "physical IO/cache effects", "syscall counts", "cleanup/error costs", "full original/candidate caller union costs"]
},
"blocked_execution_conditions": [
"Independent reviewer accepts exact package, reference extraction, actual consumer and fixed control order/count",
"Parent authenticates exact SOURCE-PINS manifest externally, actual loader/bootstrap/source bytes and before/after custody",
"Parent approves actual interpreter, standard-library and _json/hash constructor binary identities plus dynamic linked closure",
"Parent seals actual callable union; private fault injection is false for baseline/candidate consumer and any complete caller",
"Parent admits complete declared operations into existing serialized guard with complete charged resources and independent validation",
"Normal/-O controls, actual finite comparisons and measurements remain unexecuted; full H25 integration requires a separate complete consumer admission"
],
"performance_claim": null
}
94 changes: 94 additions & 0 deletions research/h25-bounded-serializer/component/CONTROL-SPEC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"count_per_mode": 70,
"coverage_boundary": [
"Exact70 concrete cases are the execution specification; prose bill families are broader than separately exercised variants.",
"No separate tuple/str/float subclass case, circular-dict case, every-artifact-position subclass cross-product, middle/final-fragment stage hash injection, ENOSPC-specific byte budget or every missing/extra schema-key variant appears in this70-case suite. Do not claim those distinct variants executed.",
"Full H25 original/candidate equality, normal/O execution, shared-observer interaction and complete resource measurements remain outstanding."
],
"modes": [
{
"name": "normal",
"optimization": 0
},
{
"name": "optimized",
"optimization": 1
}
],
"ordered_cases": [
"ordinary",
"empty",
"rows-1",
"rows-1023",
"rows-1024",
"rows-1025",
"rows-2048",
"byte-bound-169",
"byte-bound-170",
"byte-bound-171",
"scalars-unicode-wide",
"wide-unlimited",
"wide-digit-error",
"interned-rank-rows",
"depth-30",
"depth-33",
"circular",
"callback-list",
"callback-dict",
"callback-error",
"int-subclass",
"unsupported-object",
"malformed-result",
"malformed-witness",
"malformed-rank",
"nonstring-supported-keys",
"expected-result_sha256",
"expected-exact_witness_sha256",
"expected-rank_trace_sha256",
"expected-rank_call_count",
"expected-rank_distinct_matrix_count",
"failure-stage_create",
"failure-stage_open",
"failure-stage_write",
"failure-stage_flush",
"failure-stage_after_close",
"failure-stage_hash",
"failure-final_open-result.json",
"failure-final_write-result.json",
"failure-final_flush-result.json",
"failure-final_after_close-result.json",
"failure-final_open-witness.json",
"failure-final_write-witness.json",
"failure-final_flush-witness.json",
"failure-final_after_close-witness.json",
"failure-final_open-rank-trace.json",
"failure-final_write-rank-trace.json",
"failure-final_flush-rank-trace.json",
"failure-final_after_close-rank-trace.json",
"short-final-0",
"short-final-1",
"copy-corrupt-content",
"stage-mutated-size",
"copy-read-error",
"copy-hash-error",
"cleanup-unlink-error",
"cleanup-rmdir-error",
"primary-plus-close-error",
"primary-plus-manifest-error",
"drift-reference_global",
"drift-json_default",
"drift-expected_value",
"drift-effective_builtin",
"drift-json_global_shadow",
"drift-keyword_default",
"exit-json-drift",
"fallback-exit-json-drift",
"existing-finals",
"state-mutation-between-writes",
"path-subclass-fallback"
],
"runner_sha256": "72951102beea04abeed35011c82f4518e886dff921e0e515025ae0e1e61f9e09",
"schema": "h25-serializer-component-control-spec-v1",
"source_review_sha256": "9f7c7f5abcdb8c8421b82a51020afef3969ad1e2fccb4f1bbcb8484380415555",
"status": "SOURCE_SPEC_ONLY_NOT_EXECUTED"
}
91 changes: 91 additions & 0 deletions research/h25-bounded-serializer/component/FEASIBILITY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"actual_baseline_call": "component_consumer.run_component(baseline) -> exact reference.write_scientific code cloned to separate finite EXPECTED globals -> original(root,*values)",
"actual_candidate_call": "component_consumer.run_component(candidate) -> bounded_serialization.make_writer -> writer(root,*values), faults false and BOUNDED_SERIALIZATION_PASS required",
"author_disposition": "GO_FOR_INDEPENDENT_SOURCE_REVIEW_ONLY",
"author_method": "Source reads, byte copies/extraction, AST parsing, JSON metadata and hashing only",
"blocked_conditions": "BILL.json blocked_execution_conditions",
"checkpoints": {
"F1": "AUTHOR_PREPARED_AWAITING_INDEPENDENT_ACCEPTANCE",
"F2": "PROPOSED_STANDALONE_GO_AWAITING_INDEPENDENT_ACCEPTANCE",
"F3": "AUTHORED_CONCRETE_COMPONENT_CONSUMER_AND_PACKAGE",
"F4": "AWAITING_INDEPENDENT_SOURCE_ACCEPTANCE",
"F5": "NOT_EXECUTED",
"F6": "NOT_EXECUTED",
"F7": "NO_MEASUREMENT_NO_PERFORMANCE_DISPOSITION",
"F8": "NO_PUBLICATION_BY_AUTHOR"
},
"controls": {
"count_per_mode": 70,
"exact_order_source": "CONTROL-SPEC.json",
"execution": "NOT_EXECUTED",
"modes": [
"normal",
"-O"
]
},
"execution_admission": false,
"execution_counts": {
"benchmarks": 0,
"compiler": 0,
"controls": 0,
"native": 0,
"scientific_runs": 0,
"target_imports": 0
},
"full_caller_relationship": "Finite independent component only; original complete H25 caller and complete artifacts not invoked or qualified",
"imports_by_source": {
"bounded_serialization.py": [
"__future__",
"_json",
"contextlib",
"hashlib",
"json",
"json.encoder",
"os",
"pathlib",
"stat",
"tempfile",
"types"
],
"component_consumer.py": [
"__future__",
"argparse",
"bounded_serialization",
"hashlib",
"json",
"pathlib",
"reference",
"serialization_controls",
"sys",
"types"
],
"reference.py": [
"hashlib",
"json"
],
"serialization_controls.py": [
"__future__",
"bounded_serialization",
"copy",
"hashlib",
"json",
"pathlib",
"sys",
"types"
]
},
"independently_accepted": false,
"performance_claim": null,
"project_scientific_or_native_import_required": false,
"reference_excerpt_ast_and_byte_pins_verified": true,
"reviewed_code_unchanged": true,
"schema": "h25-serializer-component-author-feasibility-v1",
"scope_note": "One initial broad rg source search under outputs/h25-data-handling-20261028 returned static .py matches including that tree runtime/runs source copies; output truncated and not used for proposal. No h25-bookkeeping-swarm-20261028/runtime/runs target was searched/read. Subsequent reads explicit source paths only. No target code executed.",
"standalone_local_execution_closure": [
"component_consumer.py",
"reference.py",
"bounded_serialization.py",
"serialization_controls.py",
"CONTROL-SPEC.json"
]
}
Loading