From 3d03f22299c8d78cb9ef61761e1cc10b4fe210d3 Mon Sep 17 00:00:00 2001 From: Shawn Blackmore Date: Fri, 2 Oct 2026 14:47:39 -0700 Subject: [PATCH] feat: publish v3.4.3 BTDU orientation and language extension Adds the qualified BTDU orientation topology layer, math/code/English query surfaces, v3.4.3 build and architecture manifests, regression coverage, and public qualification/source-provenance evidence. Runtime databases, the multi-GB BTDU journal, authority material, and machine state remain excluded. --- BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json | 31 +++ BUILD_V3_4_3_LANGUAGE_20261002.json | 20 ++ .../COMBINED_BTDU_RESULT.json | 165 ++++++++++++ .../MATH_ORIENTATION_INGEST_RESULT.json | 56 ++++ .../v3.4.3-btdu-20261002/QUALIFICATION.json | 48 ++++ .../SOURCE_ACQUISITION.json | 253 ++++++++++++++++++ .../BTDU_ORIENTATION_LANGUAGE_20261002.md | 41 +++ src/40_BTDU/canonical_btdu.py | 62 ++++- src/40_BTDU/orientation_topology.py | 145 ++++++++++ tests/test_v343_btdu_orientation_language.py | 25 ++ 10 files changed, 844 insertions(+), 2 deletions(-) create mode 100644 BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json create mode 100644 BUILD_V3_4_3_LANGUAGE_20261002.json create mode 100644 docs/evidence/v3.4.3-btdu-20261002/COMBINED_BTDU_RESULT.json create mode 100644 docs/evidence/v3.4.3-btdu-20261002/MATH_ORIENTATION_INGEST_RESULT.json create mode 100644 docs/evidence/v3.4.3-btdu-20261002/QUALIFICATION.json create mode 100644 docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json create mode 100644 docs/v3.4/BTDU_ORIENTATION_LANGUAGE_20261002.md create mode 100644 src/40_BTDU/orientation_topology.py create mode 100644 tests/test_v343_btdu_orientation_language.py diff --git a/BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json b/BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json new file mode 100644 index 0000000..e9d335c --- /dev/null +++ b/BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json @@ -0,0 +1,31 @@ +{ + "schema": "entity-btdu-orientation-language-extension-v1", + "entity_display_version": "3.4.3", + "btdu_schema_version": "3.4.2", + "build_revision": "v3.4.3+btdu-orientation-math-code-english.20261002", + "orientation_modes": ["SYMMETRIC", "INVERSE_PAIR", "CONTEXT_COMMUTATIVE", "ORDERED"], + "orientation_semantics": { + "symmetric_requires_math_profile_or_proof": true, + "inverse_pair_requires_math_profile_or_proof": true, + "context_commutative_requires_explicit_proof": true, + "ordered_is_default": true + }, + "language_surfaces": ["language_summary", "lookup_english_lemma", "code_token_usage"], + "qualified_counts": { + "math_declarations": 246646, + "math_modules": 18942, + "language_nodes": 36733, + "language_relations": 595898, + "english_synsets": 107519, + "english_lemmas": 136219, + "orientation_topologies": 37490, + "orientation_occurrences": 180126 + }, + "rights_boundary": { + "topology_creates_rights": false, + "topology_creates_ownership": false, + "topology_creates_economic_entitlement": false + }, + "runtime_state_committed_to_git": false, + "historical_release_manifest_rewritten": false +} diff --git a/BUILD_V3_4_3_LANGUAGE_20261002.json b/BUILD_V3_4_3_LANGUAGE_20261002.json new file mode 100644 index 0000000..d560b4a --- /dev/null +++ b/BUILD_V3_4_3_LANGUAGE_20261002.json @@ -0,0 +1,20 @@ +{ + "btdu_schema_version": "3.4.2", + "build_revision": "v3.4.3+btdu-orientation-math-code-english.20261002", + "claim_boundary": [ + "No historical GitHub release/tag rewritten by this local rebuild.", + "Protocol origin and canonical state guarded byte-for-byte.", + "External corpora retain upstream provenance and licenses." + ], + "entity_display_version": "3.4.3", + "features": [ + "BTDU orientation/mirror topology", + "advanced mathematics corpus", + "programming-language shared atom substrate", + "English lexical/grammar substrate" + ], + "generated_unix": 1790954205.3039753, + "historical_release_manifest_preserved": true, + "lineage_guard_sha256": "F6D6DA3E4718B16403156FA774AF340044E668B06C35A992E79AA9ECF00B39DA", + "schema": "entity-v343-in-place-build-revision-v1" +} \ No newline at end of file diff --git a/docs/evidence/v3.4.3-btdu-20261002/COMBINED_BTDU_RESULT.json b/docs/evidence/v3.4.3-btdu-20261002/COMBINED_BTDU_RESULT.json new file mode 100644 index 0000000..2a53ab0 --- /dev/null +++ b/docs/evidence/v3.4.3-btdu-20261002/COMBINED_BTDU_RESULT.json @@ -0,0 +1,165 @@ +{ + "btdu_schema_version": "3.4.2", + "build_revision": "v3.4.3+btdu-orientation-math-code-english.20261002", + "duration_seconds": 1216.5715408325195, + "entity_display_version": "3.4.3", + "existing_entity_state_modified_only_by_new_btdu_namespace": true, + "lineage_guard_preserved": true, + "merged": { + "atomic_root": "0e66d770202720622408ce4781ed77115a52c02f7bf703da4108bcbf4cb97164", + "atoms": 704276, + "bonds": 795592, + "compounds": 28639, + "sequence": 75084, + "sql": { + "edges": 195860, + "english_lemmas": 136219, + "english_synsets": 107519, + "language_nodes": 36733, + "language_relations": 595898, + "math_declarations": 246646, + "math_modules": 18942, + "objects": 4932, + "orientation_occurrences": 0, + "orientation_topologies": 0 + } + }, + "ok": true, + "schema": "entity-v343-qualified-btdu-merge-v1", + "seed": { + "atomic_root": "bd5488fefb5fddd566e599a2b5e95d789b8a2b6c6738c7c85328488f6a5737a5", + "atoms": 154856, + "bonds": 163582, + "compounds": 19688, + "sequence": 75033, + "sql": { + "edges": 159748, + "english_lemmas": 0, + "english_synsets": 0, + "language_nodes": 0, + "language_relations": 0, + "math_declarations": 0, + "math_modules": 9471, + "objects": 4929, + "orientation_occurrences": 0, + "orientation_topologies": 0 + } + }, + "sources": [ + { + "atomic": { + "new_atoms": 256300, + "new_bonds": 36082, + "new_compounds": 8927 + }, + "label": "math", + "sql": { + "edges": { + "after": 195830, + "before": 159748, + "delta": 36082 + }, + "math_declarations": { + "after": 246646, + "before": 0, + "delta": 246646 + }, + "math_domains": { + "after": 103, + "before": 0, + "delta": 103 + }, + "math_module_compounds": { + "after": 8924, + "before": 0, + "delta": 8924 + }, + "math_modules": { + "after": 18942, + "before": 9471, + "delta": 9471 + }, + "math_sources": { + "after": 2, + "before": 0, + "delta": 2 + }, + "objects": { + "after": 4930, + "before": 4929, + "delta": 1 + }, + "orientation_occurrences": { + "after": 0, + "before": 0, + "delta": 0 + }, + "orientation_topologies": { + "after": 0, + "before": 0, + "delta": 0 + }, + "repository_manifests": { + "after": 61, + "before": 61, + "delta": 0 + } + } + }, + { + "atomic": { + "new_atoms": 293120, + "new_bonds": 595928, + "new_compounds": 24 + }, + "label": "language", + "sql": { + "edges": { + "after": 195860, + "before": 195830, + "delta": 30 + }, + "english_lemmas": { + "after": 136219, + "before": 0, + "delta": 136219 + }, + "english_synsets": { + "after": 107519, + "before": 0, + "delta": 107519 + }, + "language_nodes": { + "after": 36733, + "before": 0, + "delta": 36733 + }, + "language_relations": { + "after": 595898, + "before": 0, + "delta": 595898 + }, + "objects": { + "after": 4932, + "before": 4930, + "delta": 2 + }, + "orientation_occurrences": { + "after": 0, + "before": 0, + "delta": 0 + }, + "orientation_topologies": { + "after": 0, + "before": 0, + "delta": 0 + }, + "repository_manifests": { + "after": 61, + "before": 61, + "delta": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/docs/evidence/v3.4.3-btdu-20261002/MATH_ORIENTATION_INGEST_RESULT.json b/docs/evidence/v3.4.3-btdu-20261002/MATH_ORIENTATION_INGEST_RESULT.json new file mode 100644 index 0000000..6abdb5f --- /dev/null +++ b/docs/evidence/v3.4.3-btdu-20261002/MATH_ORIENTATION_INGEST_RESULT.json @@ -0,0 +1,56 @@ +{ + "claim_boundary": "Derived semantic orientation index over preserved mathlib4 source signatures; no universal compression claim.", + "dangling_occurrences": 0, + "duration_seconds": 211.17186450958252, + "eventlog": { + "base_root": "0e66d770202720622408ce4781ed77115a52c02f7bf703da4108bcbf4cb97164", + "base_sequence": 75084, + "events_appended": 37, + "final_root": "74f9c41c26f1260c01adc3db839f573cb664cbf80b84e2ba4788d7da08bbebfd", + "final_sequence": 75121 + }, + "extracted_occurrences": 181581, + "manifest": { + "atoms": 741766, + "authority_id": "9eedbc890bcb26d065b8900bf73d766b2ff90af7e4304564b77979445206ffdf", + "bonds": 795592, + "checkpoint_root": "0000000000000000000000000000000000000000000000000000000000000000", + "checkpoint_sequence": 0, + "compounds": 28639, + "format": "ADAM-v0.41-construction-native-universe", + "recovered_torn_bytes": 0, + "root_hash": "74f9c41c26f1260c01adc3db839f573cb664cbf80b84e2ba4788d7da08bbebfd", + "sequence": 75121 + }, + "orientation_counts": { + "occurrences": 180126, + "topologies": 37490 + }, + "pass": true, + "rights_boundary": { + "topology_creates_economic_entitlement": false, + "topology_creates_ownership": false, + "topology_creates_rights": false + }, + "schema": "entity-btdu-math-orientation-ingest-result-v1", + "sqlite_quick_check": "ok", + "strategy": "memory-bounded-eventlog-append", + "top_families": { + "equality": 15692, + "iff": 4015, + "inequality": 610, + "nonstrict_order": 4051, + "ordered:*": 2801, + "ordered:+": 1873, + "ordered:-": 1579, + "ordered:/": 704, + "ordered:^": 761, + "ordered:\u2192": 3568, + "strict_order": 1836 + }, + "topology_modes": { + "INVERSE_PAIR": 5887, + "ORDERED": 11286, + "SYMMETRIC": 20317 + } +} \ No newline at end of file diff --git a/docs/evidence/v3.4.3-btdu-20261002/QUALIFICATION.json b/docs/evidence/v3.4.3-btdu-20261002/QUALIFICATION.json new file mode 100644 index 0000000..dad7c6d --- /dev/null +++ b/docs/evidence/v3.4.3-btdu-20261002/QUALIFICATION.json @@ -0,0 +1,48 @@ +{ + "schema": "entity-v343-btdu-public-qualification-v1", + "qualified_utc": "2026-10-02T21:29:46.1181285Z", + "entity_display_version": "3.4.3", + "btdu_schema_version": "3.4.2", + "build_revision": "v3.4.3+btdu-orientation-math-code-english.20261002", + "installed_regression_tests": {"passed": 102, "total": 102}, + "publication_integration_tests": {"passed": 103, "total": 103, "base_commit": "349c1d752323bf237f3ef40b6e73c911bb966c6c"}, + "signed_state": { + "final_sequence": 75121, + "final_root": "74f9c41c26f1260c01adc3db839f573cb664cbf80b84e2ba4788d7da08bbebfd", + "sqlite_quick_check": "ok", + "dangling_orientation_occurrences": 0, + "duplicate_orientation_atom_refs": 0 + }, + "counts": { + "math_declarations": 246646, + "math_modules": 18942, + "language_nodes": 36733, + "language_relations": 595898, + "english_synsets": 107519, + "english_lemmas": 136219, + "orientation_topologies": 37490, + "orientation_occurrences": 180126 + }, + "lineage_guard": { + "preserved": true, + "protocol_freeze_sha256": "8099811548F3A8C25DA192AD732CFC767020E0491C805C2C79764E351296DDFF", + "protocol_origin_bundle_sha256": "26D86A01E855F4433FC23BF693B1D043209750F3D432A79BF61AD5BC3602DAD5", + "canonical_state_sha256": "FF7E1199422207DA0FFF9AD50C70C8E788B04439BEDDFC68906B89F9C19E8F53" + }, + "claim_boundary": { + "runtime_state_committed_to_git": false, + "multi_gigabyte_btdu_journal_committed_to_git": false, + "historical_release_manifest_rewritten": false, + "topology_creates_rights": false, + "topology_creates_ownership": false, + "topology_creates_economic_entitlement": false, + "universal_compression_claim": false + }, + "published_file_hashes": { + "src/40_BTDU/canonical_btdu.py": "5878BA5FCBA6DA30B326C23757477E65B06D3E59C4BC9AE7BA335C0DE0A92E80", + "src/40_BTDU/orientation_topology.py": "F151C44578A1D7E2C47F02AFCD11DA6CEF6F83CD31DB0924E89317AF61BEBFF6", + "tests/test_v343_btdu_orientation_language.py": "93059F28699A9EDE04DFB376CF2060E1B383A4A28E0CFC223AA329E2C0596965", + "BUILD_V3_4_3_LANGUAGE_20261002.json": "570038518B35851B7712F19BD1B50ED6B2FF5007891D379F07FF910AC48B9DE5", + "BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json": "CA224E4DE3340444E61E49F469FF5442662FECC4CD163076A133F77B9F4B6E26" + } +} diff --git a/docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json b/docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json new file mode 100644 index 0000000..a052ecd --- /dev/null +++ b/docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json @@ -0,0 +1,253 @@ +{ + "english_primary_source": "english_wordnet2025", + "generated_unix": 1790953526.7534306, + "minimums": { + "cargo": 8, + "csharp": 20, + "english_wordnet2025": 10, + "english_wordnet31": 8, + "go": 20, + "java": 10, + "kotlin": 20, + "python": 20, + "rust": 20, + "swift": 20, + "typescript": 7 + }, + "pass": true, + "problems": [], + "repos": { + "cargo": { + "acquisition": "curated-current-master-with-file-hashes", + "aggregate_sha256": "920d6febbe88641073b34ce69bd6e54c4b5055af92c012688654725986ce4c8e", + "bytes_kept": 279593, + "commit": "4f1cb5d5cb05f6a3b30dbc82db59d76551b8ddc1", + "default_branch": "master", + "files_kept": 12, + "license": "Apache-2.0", + "paths": [ + "doc/book/src/reference/config.md", + "doc/book/src/reference/manifest.md", + "doc/book/src/reference/features.md", + "doc/book/src/reference/build-scripts.md", + "doc/book/src/reference/specifying-dependencies.md", + "doc/book/src/reference/environment-variables.md", + "doc/book/src/reference/cargo-targets.md", + "doc/book/src/reference/profiles.md", + "crates/cargo-util-schemas/manifest.schema.json", + "Cargo.toml", + "LICENSE-MIT", + "LICENSE-APACHE" + ], + "repo": "rust-lang/cargo", + "source_url": "https://github.com/rust-lang/cargo" + }, + "csharp": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "a60f37e5bdc6a6a083bcfaf786eaa5e9ed73ad0750f788ef217036ecfef1d2e7", + "bytes_kept": 1921228, + "commit": "107068a0fee88b13e9c46ff64f98343ff29ff8ee", + "default_branch": "draft-v8", + "files_kept": 34, + "license": "CC-BY-4.0", + "repo": "dotnet/csharpstandard", + "source_url": "https://github.com/dotnet/csharpstandard" + }, + "english_wordnet2025": { + "acquisition": "official 2025 WN-LMF/WordNet database archive", + "aggregate_sha256": "d6061b012d400aedc043f5f31eb67f507da126fbc74487fabadb061035cbfb7e", + "archive_sha256": "38b16326159f51853626b7d24a44c453fa88ab33f06fce5ec8fc5996d1c2be93", + "bytes_kept": 31911017, + "files": [ + [ + "adj.exc", + 18231, + "17bd79dbae17636fb4cd9b692b4945c19e5acd2e23b8e372268b5fb89e975531" + ], + [ + "adv.exc", + 85, + "e7291461b629abfe63301bbe1998cee09fd575ed7107abd7ea9763adb05bf0a8" + ], + [ + "data.adj", + 3166133, + "98651304f90602352120dffdd27dfeb8a3fa4dadfc712391934ad5f466601059" + ], + [ + "data.adv", + 522340, + "c40c0bf2eb0c0ba682663a1ad8f62c4eb7cd581189a8f19368b93c6dda8e04d7" + ], + [ + "data.noun", + 13339217, + "97c1c4e4f323e2b29bba5ac52b64aca5b91df9f7661dbc65cf64f28ea36e98d3" + ], + [ + "data.verb", + 2868258, + "2ef76318838583e5cb0d04d019fd7200c629d7aed8cc5cfea41122d3d67c866c" + ], + [ + "index.adj", + 827163, + "85e1e08cc4fc8ac5a8f9d32564799e5e67f04812165dcc8de354797ab53c6492" + ], + [ + "index.adv", + 163176, + "bdd918323bcd816e59564abc2a707c37fad6ccb66b1daf28567a16bef8f4dbd8" + ], + [ + "index.noun", + 3903825, + "b833126645b2f43ddeddf2e3038264b6be09980d37d6740d02e5df625a6cce34" + ], + [ + "index.sense", + 6497917, + "dd12973335613642af035c1174c42a10cf5daa3a301e0497aaf7619045842fee" + ], + [ + "index.verb", + 530063, + "2186bf15fae5100d6220e55bd2af3079849e2f1e82d473642d1c5d0becda54ea" + ], + [ + "LICENSE.md", + 19863, + "672cc8b5663e8dc74c4b07a9dcf477193853575b119908fd3dc0aeeb60a9dbbb" + ], + [ + "noun.exc", + 24647, + "c976744abeb6e99792f8c74fb8f1a2d4da13c7c4227c914d80fe39f596a476bc" + ], + [ + "verb.exc", + 28359, + "bd999f2b30b9126aab9aaa9cb895b92bca72cb6797da41b7b308994716e7ab03" + ], + [ + "WNDB_License.txt", + 1740, + "df30ec18fbabcdaf031b79ea026d3e6b959010cffe6dd7be9ac137822175b904" + ] + ], + "files_kept": 15, + "license": "CC-BY-4.0 plus retained WordNet notices", + "source": "Open English WordNet 2025", + "source_url": "https://en-word.net/static/english-wordnet-2025.zip" + }, + "go": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "6c615315e817afc914898ccf01372fd2cb58485cd105b3f11a9357bb092c6d08", + "bytes_kept": 620308, + "commit": "ff48d740d5e6dcf01cb1023b382a858a493c5f69", + "default_branch": "master", + "files_kept": 61, + "license": "BSD-3-Clause", + "repo": "golang/go", + "source_url": "https://github.com/golang/go" + }, + "java": { + "acquisition": "OpenJDK javac parser/tokenizer slice", + "aggregate_sha256": "256122dd7cf872349b52358a779563adffd7e05b0d9a91864c40afdf35784fe8", + "bytes_kept": 484086, + "commit": "e90e46919999fb8e65140efe2d9bb2a870ec99a6", + "default_branch": "master", + "files_kept": 17, + "license": "GPL-2.0", + "paths": [ + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/LazyDocCommentTable.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Parser.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ReferenceParser.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Scanner.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ScannerFactory.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/TextBlockSupport.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java", + "src/jdk.compiler/share/classes/com/sun/tools/javac/parser/VirtualParser.java", + "LICENSE", + "ADDITIONAL_LICENSE_INFO" + ], + "repo": "openjdk/jdk", + "source_url": "https://github.com/openjdk/jdk" + }, + "kotlin": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "6079716ca6872402a443399f967b1a4b51b7fd0b0d4d4bf37a81357380828635", + "bytes_kept": 711777, + "commit": "0f762a2314a9304e4b3fc386b1aceef1d56c7e4c", + "default_branch": "release", + "files_kept": 84, + "license": "Apache-2.0", + "repo": "Kotlin/kotlin-spec", + "source_url": "https://github.com/Kotlin/kotlin-spec" + }, + "python": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "10c3538752bf659cc902595fb7daa81d355f829bed42d8bd593c642a14d55d9f", + "bytes_kept": 2591830, + "commit": "a831abba141ceeb0ef8acfada37602aa578cc670", + "default_branch": "main", + "files_kept": 49, + "license": "NOASSERTION", + "repo": "python/cpython", + "source_url": "https://github.com/python/cpython" + }, + "rust": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "44087b4e85c4e7db0d6c4bb118804cb55496bf5aa6679b9b4bfa528b07e20f9c", + "bytes_kept": 1130819, + "commit": "a286e1ecb8ce193d50056e4bb042eea9b23876ef", + "default_branch": "master", + "files_kept": 124, + "license": "Apache-2.0", + "repo": "rust-lang/reference", + "source_url": "https://github.com/rust-lang/reference" + }, + "swift": { + "acquisition": "previous-pinned-selective-source", + "aggregate_sha256": "1d10db9be1bf85367d79ac0d16d056f84326bfc2bc58437422ad181d45007ad5", + "bytes_kept": 1681924, + "commit": "1c0598430507e6c2b9a0f068b6dd7c618392fea6", + "default_branch": "main", + "files_kept": 39, + "license": "Apache-2.0", + "repo": "swiftlang/swift-book", + "source_url": "https://github.com/swiftlang/swift-book" + }, + "typescript": { + "acquisition": "curated-pinned-files", + "aggregate_sha256": "4693430be0725206347d6dbd3d9e4e717b5e072cd46690a1b3f8650f085c4a03", + "bytes_kept": 2146712, + "commit": "09b1db0617311f3b39f165bb3480c0ce2f718b27", + "default_branch": "main", + "files_kept": 9, + "license": "Apache-2.0", + "paths": [ + "packages/typescript/src/ast/ast.ts", + "packages/typescript/src/ast/ast.generated.ts", + "tsc/internal/parser/parser.go", + "tsc/internal/scanner/scanner.go", + "tsc/internal/ast/ast.go", + "tsc/internal/checker/checker.go", + "tsc/internal/compiler/program.go", + "LICENSE.txt", + "NOTICE.txt" + ], + "repo": "microsoft/TypeScript", + "source_url": "https://github.com/microsoft/TypeScript" + } + }, + "schema": "entity-language-source-acquisition-v5", + "updated_unix": 1790953891.7196918 +} \ No newline at end of file diff --git a/docs/v3.4/BTDU_ORIENTATION_LANGUAGE_20261002.md b/docs/v3.4/BTDU_ORIENTATION_LANGUAGE_20261002.md new file mode 100644 index 0000000..559ac9d --- /dev/null +++ b/docs/v3.4/BTDU_ORIENTATION_LANGUAGE_20261002.md @@ -0,0 +1,41 @@ +# BTDU Orientation, Mathematics and Language Extension — 2026-10-02 + +This document describes the qualified in-place ENTITY v3.4.3 BTDU extension identified by build revision `v3.4.3+btdu-orientation-math-code-english.20261002`. + +The public ENTITY display version remains **v3.4.3** and the BTDU schema version remains **3.4.2**. Historical release manifests and the canonical protocol-origin lineage are not rewritten by this extension. + +## What is included + +The source change adds a semantic orientation layer to BTDU, plus read/query surfaces for the qualified mathematics, programming-language and English indexes. The orientation layer distinguishes `SYMMETRIC`, `INVERSE_PAIR`, `CONTEXT_COMMUTATIVE` and `ORDERED` relations. Ordered behavior remains the default unless a mathematical profile or explicit proof permits normalization. + +The qualified data state contains 246,646 mathematical declarations across 18,942 modules; 36,733 programming-language nodes with 595,898 language relations; 107,519 English synsets and 136,219 English lemmas; and 37,490 orientation topologies referenced by 180,126 occurrences. + +## Programming-language source coverage + +The source-acquisition manifest records pinned or curated material for Python, Java, Rust, Cargo, TypeScript, C#, Go, Kotlin and Swift. English lexical material is based on Open English WordNet 2025. Upstream provenance, commit identifiers and license information are retained in `docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json`. + +## Rights and provenance boundary + +Orientation is a derived semantic index. A normalized topology does not create ownership, usage rights or an economic entitlement. Exact source records and their provenance remain distinct from orientation topology. The build also makes no universal compression claim. + +## Qualification + +The installed production copy was replayed and verified against its signed journal. The final signed state is sequence **75,121** with root `74f9c41c26f1260c01adc3db839f573cb664cbf80b84e2ba4788d7da08bbebfd`. SQLite `quick_check` returned `ok`, there were zero dangling orientation occurrences, and the installed targeted regression gate completed **102/102 PASS**. + +## Repository boundary + +This repository contains the implementation, tests and public qualification evidence. It intentionally does **not** contain the multi-gigabyte BTDU journal, SQLite runtime databases, production state, authority keys, bindings, credentials, backups or other machine-specific mutable state. + +Relevant files: + +- `src/40_BTDU/canonical_btdu.py` +- `src/40_BTDU/orientation_topology.py` +- `tests/test_v343_btdu_orientation_language.py` +- `BUILD_V3_4_3_LANGUAGE_20261002.json` +- `BTDU_ORIENTATION_LANGUAGE_EXTENSION_V1.json` +- `docs/evidence/v3.4.3-btdu-20261002/QUALIFICATION.json` +- `docs/evidence/v3.4.3-btdu-20261002/COMBINED_BTDU_RESULT.json` +- `docs/evidence/v3.4.3-btdu-20261002/MATH_ORIENTATION_INGEST_RESULT.json` +- `docs/evidence/v3.4.3-btdu-20261002/SOURCE_ACQUISITION.json` + +The evidence files describe a controlled, qualified representation and indexing build. They should not be read as evidence that ENTITY universally compresses arbitrary data, replaces an LLM's learned parameters, or reduces inference compute without workload-specific testing. diff --git a/src/40_BTDU/canonical_btdu.py b/src/40_BTDU/canonical_btdu.py index 61bb280..f027c2c 100644 --- a/src/40_BTDU/canonical_btdu.py +++ b/src/40_BTDU/canonical_btdu.py @@ -13,6 +13,7 @@ BTDU_VERSION="3.4.2" BTDU_SCHEMA="blackmore-technology-data-universe-v1" +BTDU_BUILD_REVISION="v3.4.3+btdu-orientation-math-code-english.20261002" BTDU_CANONICAL_OWNER_ENTITY_ID="ent2-6eoiiztjyhmyh2tbr5psmofcduwvjledubhoiqwo6mjfoqkn6ica" BTDU_CANONICAL_OWNER_ALIAS="shawn.blackmore.entity" BTG_STEWARD_ENTITY_ID="ent2-kkov66eoh23h3zgr4pe4njsbkayn2kxad6vfyirqvuqrty52clpa" @@ -38,13 +39,20 @@ def __init__(self,state_dir:str|Path,*,authorization_verifier:Callable[[Mapping[ self.authorization_verifier=authorization_verifier; self.sovereign_entity_id=str(sovereign_entity_id); self.protocol_entity_id=str(protocol_entity_id); self.steward_entity_id=str(steward_entity_id) self.runtime=EntityFullAdamRuntime(self.root/"adam",authorization_verifier=authorization_verifier,enable_network_reference=enable_network_reference) self.atomic=self.runtime.atomic; self.evidence=self.runtime.evidence; self.db_path=self.root/"btdu_index.sqlite" - self._init_db(); self._load_adam_extensions(); self._ensure_root() + self._init_db(); self._load_adam_extensions(); self._load_orientation_layer(); self._ensure_root() def _load_adam_extensions(self): from adam_v44.bond_algebra import BondAlgebra,FirstClassBond,HyperBond,HyperRole,BondFamily,ConfidenceClass from adam_v42.distributed import SovereignErasureStore self.BondAlgebra=BondAlgebra; self.FirstClassBond=FirstClassBond; self.HyperBond=HyperBond; self.HyperRole=HyperRole; self.BondFamily=BondFamily; self.ConfidenceClass=ConfidenceClass; self.SovereignErasureStore=SovereignErasureStore + def _load_orientation_layer(self): + import importlib.util + path=HERE/"orientation_topology.py" + spec=importlib.util.spec_from_file_location("entity_btdu_orientation_topology",path) + mod=importlib.util.module_from_spec(spec); sys.modules[spec.name]=mod; spec.loader.exec_module(mod) + self.orientation=mod.BTDUOrientationLayer(self) + @contextmanager def _db(self): db=sqlite3.connect(self.db_path); db.row_factory=sqlite3.Row @@ -214,6 +222,54 @@ def mirror_genesis_market_chain(self,authorization_receipt:Mapping[str,Any],*,pr edges=[{"source":nodes[i]["ref"],"predicate":"precedes","target":nodes[i+1]["ref"],"metadata":{"genesis_market_semantics":True}} for i in range(len(nodes)-1)] return self.mirror_economic_lineage(nodes=nodes,edges=edges,authorization_receipt=authorization_receipt,evidence_sha256=evidence_sha256) + def normalize_oriented_relation(self,left_ref:str,operator:str,right_ref:str,context:dict[str,Any]|None=None)->dict[str,Any]: + n=self.orientation.topology_for(left_ref,operator,right_ref,context) + return dict(n.__dict__) + + def register_oriented_relations(self,rows:list[dict[str,Any]],authorization_receipt:Mapping[str,Any],*,chunk_size:int=2000)->dict[str,int]: + self._authorize(authorization_receipt) + return self.orientation.register_bulk(rows,chunk_size=chunk_size) + + def language_summary(self)->dict[str,Any]: + with self._db() as db: + tables={r["name"] for r in db.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()} + counts={name:(db.execute("SELECT count(*) AS n FROM "+name).fetchone()["n"] if name in tables else 0) + for name in ("language_nodes","language_relations","english_synsets","english_lemmas")} + return {"schema":"entity-btdu-language-summary-v1","build_revision":BTDU_BUILD_REVISION,**counts} + + def lookup_english_lemma(self,lemma:str,*,pos:str|None=None,limit:int=50)->dict[str,Any]: + with self._db() as db: + tables={r["name"] for r in db.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()} + if not {"english_lemmas","english_synsets","language_relations"}.issubset(tables): + return {"schema":"entity-btdu-english-lookup-v1","query":str(lemma),"matches":[]} + sql="""SELECT l.lemma_ref,l.lemma,l.pos,l.synset_count,r.source_ref AS synset_ref,s.gloss + FROM english_lemmas l + LEFT JOIN language_relations r ON r.target_ref=l.lemma_ref AND r.predicate='contains_lemma' + LEFT JOIN english_synsets s ON s.synset_ref=r.source_ref + WHERE lower(l.lemma)=lower(?)""" + args=[str(lemma)] + if pos is not None: + sql+=" AND l.pos=?"; args.append(str(pos)) + sql+=" ORDER BY l.pos,r.source_ref LIMIT ?"; args.append(max(1,min(int(limit),500))) + rows=[dict(r) for r in db.execute(sql,args).fetchall()] + return {"schema":"entity-btdu-english-lookup-v1","query":str(lemma),"pos":pos,"matches":rows} + + def code_token_usage(self,token:str,*,limit:int=100)->dict[str,Any]: + ref="code-token:"+str(token) + with self._db() as db: + tables={r["name"] for r in db.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()} + if not {"language_nodes","language_relations"}.issubset(tables): + return {"schema":"entity-btdu-code-token-usage-v1","token":str(token),"languages":[]} + rows=db.execute("""SELECT source_ref,metadata_json FROM language_relations + WHERE target_ref=? AND predicate='uses_code_token' + ORDER BY source_ref LIMIT ?""",(ref,max(1,min(int(limit),500)))).fetchall() + uses=[] + for r in rows: + md=json.loads(r["metadata_json"]) if r["metadata_json"] else {} + uses.append({"language_ref":r["source_ref"],"token_class":md.get("token_class"), + "occurrence_count":md.get("occurrence_count"),"direction_preserved":md.get("direction_preserved",True)}) + return {"schema":"entity-btdu-code-token-usage-v1","token":str(token),"languages":uses} + def passport_binding(self,object_ref:str)->dict[str,Any]: with self._db() as db: row=db.execute("SELECT object_ref,atom_id,content_sha256,controller_entity_id,source_entity_id,rights_holder_entity_id FROM objects WHERE object_ref=?",(str(object_ref),)).fetchone() @@ -264,7 +320,9 @@ def verify(self,*,deep:bool=True)->dict[str,Any]: present={r["target_ref"] for r in db.execute("SELECT target_ref FROM edges WHERE predicate='preserves_genesis_primitive'").fetchall()} econ_edges=[dict(r) for r in db.execute("SELECT * FROM economic_edges").fetchall()] if not primitive_targets.issubset(present): problems.append("genesis_primitives") - return {"schema":"entity-btdu-verification-v1","btdu_version":BTDU_VERSION,"pass":bool(atomic.get("pass")) and not problems,"atomic":atomic,"atomic_root":self.atomic.root_hash,"sovereign_entity_id":self.sovereign_entity_id,"protocol_entity_id":self.protocol_entity_id,"objects":len(objects),"economic_lineage_edges":len(econ_edges),"genesis_primitives_preserved":primitive_targets.issubset(present),"protocol_origin_is_not_asset_provenance":True,"automatic_protocol_royalty_bps":0,"problems":problems} + orientation=self.orientation.verify() + if not orientation.get("pass"): problems.append("orientation") + return {"schema":"entity-btdu-verification-v1","btdu_version":BTDU_VERSION,"build_revision":BTDU_BUILD_REVISION,"pass":bool(atomic.get("pass")) and not problems,"atomic":atomic,"orientation":orientation,"language_summary":self.language_summary(),"atomic_root":self.atomic.root_hash,"sovereign_entity_id":self.sovereign_entity_id,"protocol_entity_id":self.protocol_entity_id,"objects":len(objects),"economic_lineage_edges":len(econ_edges),"genesis_primitives_preserved":primitive_targets.issubset(present),"protocol_origin_is_not_asset_provenance":True,"automatic_protocol_royalty_bps":0,"problems":problems} def close(self): self.runtime.close() def __enter__(self): return self diff --git a/src/40_BTDU/orientation_topology.py b/src/40_BTDU/orientation_topology.py new file mode 100644 index 0000000..a0e6db1 --- /dev/null +++ b/src/40_BTDU/orientation_topology.py @@ -0,0 +1,145 @@ +from __future__ import annotations +from dataclasses import dataclass +from typing import Any, Iterable +import hashlib, json + +ORIENTATION_SCHEMA="entity-btdu-orientation-topology-v1" +SAFE_SYMMETRIC={"=":"equality","≠":"inequality","↔":"iff"} +SAFE_INVERSE={"<":("strict_order",False),">":("strict_order",True), + "≤":("nonstrict_order",False),"≥":("nonstrict_order",True)} +CONTEXTUAL_COMMUTATIVE={"+":"addition","*":"multiplication"} + +def _hash(value:Any)->str: + raw=json.dumps(value,sort_keys=True,separators=(",",":"),ensure_ascii=False).encode("utf-8") + return hashlib.sha256(raw).hexdigest() + +@dataclass(frozen=True) +class NormalizedRelation: + topology_id:str + family:str + mode:str + left_ref:str + right_ref:str + handedness:str + original_operator:str + +class BTDUOrientationLayer: + def __init__(self, universe): + self.u=universe + self._init_db() + def _init_db(self): + with self.u._db() as db: + db.executescript(""" + CREATE TABLE IF NOT EXISTS orientation_topologies( + topology_id TEXT PRIMARY KEY, atom_id TEXT NOT NULL UNIQUE, + family TEXT NOT NULL, mode TEXT NOT NULL, + left_ref TEXT NOT NULL, right_ref TEXT NOT NULL, + metadata_json TEXT NOT NULL); + CREATE INDEX IF NOT EXISTS idx_orientation_family + ON orientation_topologies(family,left_ref,right_ref); + CREATE TABLE IF NOT EXISTS orientation_occurrences( + occurrence_ref TEXT PRIMARY KEY, topology_id TEXT NOT NULL, + source_ref TEXT NOT NULL, handedness TEXT NOT NULL, + original_operator TEXT NOT NULL, metadata_json TEXT NOT NULL); + CREATE INDEX IF NOT EXISTS idx_orientation_occ_topology + ON orientation_occurrences(topology_id); + """) + + @staticmethod + def normalize(left_ref:str,operator:str,right_ref:str,context:dict[str,Any]|None=None)->NormalizedRelation: + left,right,op=str(left_ref),str(right_ref),str(operator) + context=dict(context or {}) + profile=str(context.get("semantic_profile","generic")).lower() + math_profile=profile in ("math","mathematics","formal_math") + symmetry_allowed=math_profile or context.get("symmetric_proved") is True + inverse_allowed=math_profile or context.get("inverse_pair_proved") is True + mode="ORDERED"; family="ordered:"+op; hand="FWD"; a,b=left,right + if op in SAFE_SYMMETRIC and symmetry_allowed: + family=SAFE_SYMMETRIC[op]; mode="SYMMETRIC" + if right < left: a,b=right,left; hand="REV" + else: hand="FWD" + elif op in SAFE_INVERSE and inverse_allowed: + family,reverse=SAFE_INVERSE[op]; mode="INVERSE_PAIR" + if reverse: a,b=right,left; hand="REV" + else: hand="FWD" + elif op in CONTEXTUAL_COMMUTATIVE and context.get("commutative_proved") is True: + family="proved_commutative:"+CONTEXTUAL_COMMUTATIVE[op]; mode="CONTEXT_COMMUTATIVE" + if right < left: a,b=right,left; hand="REV" + else: hand="FWD" + value={"schema":ORIENTATION_SCHEMA,"family":family,"mode":mode,"left_ref":a,"right_ref":b} + return NormalizedRelation("btdu-topology:"+_hash(value),family,mode,a,b,hand,op) + def topology_for(self,left_ref:str,operator:str,right_ref:str,context:dict[str,Any]|None=None)->NormalizedRelation: + return self.normalize(left_ref,operator,right_ref,context) + + def register_bulk(self, rows:Iterable[dict[str,Any]], *, chunk_size:int=2000)->dict[str,int]: + rows=list(rows); prepared=[]; unique={} + for i,row in enumerate(rows): + nr=self.normalize(row["left_ref"],row["operator"],row["right_ref"],row.get("context")) + occurrence=str(row.get("occurrence_ref") or ("orientation-occ:"+_hash({"i":i,"source":row["source_ref"],"triple":[row["left_ref"],row["operator"],row["right_ref"]]}))) + md=dict(row.get("metadata") or {}) + md.update({"topology_does_not_create_rights":True,"topology_does_not_create_ownership":True, + "economic_entitlement_created":False,"exact_source_preserved_elsewhere":True}) + prepared.append((row,nr,occurrence,md)) + unique[nr.topology_id]=nr + topology_atom={} + unique_items=list(unique.items()) + for start in range(0,len(unique_items),chunk_size): + part=unique_items[start:start+chunk_size] + specs=[] + for tid,nr in part: + value={"schema":ORIENTATION_SCHEMA,"topology_id":tid,"family":nr.family,"mode":nr.mode, + "left_ref":nr.left_ref,"right_ref":nr.right_ref} + meta={"btdu_orientation":True,"semantic_index":True,"rights_created":False} + specs.append(("btdu_orientation_topology",value,meta)) + ids=self.u._put_atoms(specs,reason="orientation_topologies") + for (tid,_),aid in zip(part,ids): topology_atom[tid]=aid + edge_count=0 + with self.u._db() as db: + db.executemany("INSERT OR REPLACE INTO orientation_topologies VALUES(?,?,?,?,?,?,?)",[ + (tid,topology_atom[tid],nr.family,nr.mode,nr.left_ref,nr.right_ref, + json.dumps({"rights_created":False,"schema":ORIENTATION_SCHEMA},sort_keys=True)) + for tid,nr in unique_items]) + db.executemany("INSERT OR REPLACE INTO orientation_occurrences VALUES(?,?,?,?,?,?)",[ + (occ,nr.topology_id,str(row["source_ref"]),nr.handedness,nr.original_operator,json.dumps(md,sort_keys=True)) + for row,nr,occ,md in prepared]) + # Only source records that already have an ADAM atom receive an ADAM semantic edge. + edge_rows=[]; ops=[] + for row,nr,occ,md in prepared: + source_atom=row.get("source_atom_id") + if not source_atom: continue + target=topology_atom[nr.topology_id] + bmeta={"orientation_occurrence":occ,"handedness":nr.handedness, + "topology_does_not_create_rights":True} + bid,op=self.u.atomic.bond_op(source_atom,"expresses_oriented_topology",target, + context="BTDU_ORIENTATION_TOPOLOGY",metadata=bmeta) + if op: ops.append(op) + edge_rows.append((bid,source_atom,"expresses_oriented_topology",target, + str(row["source_ref"]),nr.topology_id,json.dumps(bmeta,sort_keys=True))) + if len(ops)>=chunk_size: + self.u._commit(ops,metadata={"btdu":"orientation_edges","count":len(ops)}) + ops=[] + if ops: self.u._commit(ops,metadata={"btdu":"orientation_edges","count":len(ops)}) + if edge_rows: + with self.u._db() as db: db.executemany("INSERT OR REPLACE INTO edges VALUES(?,?,?,?,?,?,?)",edge_rows) + edge_count=len(edge_rows) + return {"input_occurrences":len(prepared),"unique_topologies":len(unique_items),"adam_edges":edge_count} + + def counts(self)->dict[str,int]: + with self.u._db() as db: + return {"topologies":db.execute("select count(*) from orientation_topologies").fetchone()[0], + "occurrences":db.execute("select count(*) from orientation_occurrences").fetchone()[0]} + def verify(self)->dict[str,Any]: + problems=[] + with self.u._db() as db: + rows=db.execute("select topology_id,atom_id,mode from orientation_topologies").fetchall() + dangling=db.execute("""select count(*) from orientation_occurrences o + left join orientation_topologies t on t.topology_id=o.topology_id + where t.topology_id is null""").fetchone()[0] + for row in rows: + if row["atom_id"] not in self.u.atomic.atoms: problems.append("missing_atom:"+row["topology_id"]) + if row["mode"] not in ("SYMMETRIC","INVERSE_PAIR","CONTEXT_COMMUTATIVE","ORDERED"): + problems.append("bad_mode:"+row["topology_id"]) + if dangling: problems.append("dangling_occurrences:"+str(dangling)) + return {"schema":"entity-btdu-orientation-verification-v1","pass":not problems, + "counts":self.counts(),"problems":problems, + "topology_does_not_create_rights":True} diff --git a/tests/test_v343_btdu_orientation_language.py b/tests/test_v343_btdu_orientation_language.py new file mode 100644 index 0000000..aeded38 --- /dev/null +++ b/tests/test_v343_btdu_orientation_language.py @@ -0,0 +1,25 @@ +import importlib.util, os, pathlib, sys, tempfile, unittest +REPO=pathlib.Path(__file__).resolve().parents[1] +BTDU=REPO/"src"/"40_BTDU"/"canonical_btdu.py" +def load(): + spec=importlib.util.spec_from_file_location("v343_orientation_btdu_test",BTDU) + mod=importlib.util.module_from_spec(spec); sys.modules[spec.name]=mod; spec.loader.exec_module(mod); return mod +@unittest.skipUnless(os.environ.get("ENTITY_ADAM_V1_ROOT"),"ENTITY_ADAM_V1_ROOT required") +class V343OrientationTests(unittest.TestCase): + def test_orientation_root_and_language_summary(self): + m=load() + with tempfile.TemporaryDirectory(prefix="v343-orient-",ignore_cleanup_errors=True) as td: + u=m.BlackmoreTechnologyDataUniverse(td,authorization_verifier=lambda r:True, + sovereign_entity_id="ent2-v343orientationtest000000000000000000000000000000000000000") + math={"semantic_profile":"mathematics"} + code={"semantic_profile":"code"} + self.assertEqual(u.normalize_oriented_relation("a","<","b",math)["topology_id"], + u.normalize_oriented_relation("b",">","a",math)["topology_id"]) + self.assertNotEqual(u.normalize_oriented_relation("a","<","b",code)["topology_id"], + u.normalize_oriented_relation("b",">","a",code)["topology_id"]) + self.assertEqual(m.BTDU_VERSION,"3.4.2") + self.assertTrue(m.BTDU_BUILD_REVISION.startswith("v3.4.3+")) + self.assertEqual(u.language_summary()["language_nodes"],0) + self.assertTrue(u.verify(deep=False)["pass"]) + u.close() +if __name__=="__main__": unittest.main()