diff --git a/.github/workflows/navigation.yml b/.github/workflows/navigation.yml new file mode 100644 index 000000000..1615ac0b1 --- /dev/null +++ b/.github/workflows/navigation.yml @@ -0,0 +1,35 @@ +name: Research navigation and public source checks +'on': + push: + branches: [chatgpt/navigation-price-20260924] + pull_request: + paths: ['README.md', 'docs/**', 'tools/navigation_check.py', 'tests/test_navigation.py', '.github/workflows/navigation.yml'] + workflow_dispatch: +permissions: + contents: read +jobs: + navigation: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.11' + - name: Current landing and navigation controls + run: | + mkdir -p navigation-evidence + python --version > navigation-evidence/python.txt + git rev-parse HEAD > navigation-evidence/commit.txt + python -B -S tools/workspace_landing_check.py > navigation-evidence/landing.txt + python -B -S -m unittest discover -s tests -p 'test_*.py' -v > navigation-evidence/tests-normal.log 2>&1 + python -B -O -S -m unittest discover -s tests -p 'test_*.py' -v > navigation-evidence/tests-optimized.log 2>&1 + python -B -S tools/navigation_check.py --verify-public > navigation-evidence/navigation.json + - name: Preserve actual results including failures + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: research-navigation-${{ github.run_id }} + path: navigation-evidence + if-no-files-found: error + retention-days: 30 diff --git a/README.md b/README.md index e5be5ca2a..a3b544f50 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,49 @@ -# Universal-law — Dylan Roy’s Collaborative Research Workspace +# Universal-law — Dylan Roy's research home -**Mathematics, scientific computing, and autonomous multi-model collaboration.** +**Mathematics, reproducible computation, and collaborative research.** -This repository is a working research environment: models develop ideas, write and run -software, test arguments, review one another's work, and improve the workspace itself. -Its current mathematical program studies persistence and Gaussian random fields, -including the q0 / SIDE24, H3, RN, and LPW workstreams. +[Read the mathematics](docs/RESEARCH_INDEX.md) · [Run the checks](docs/REPRODUCE.md) · [Open work](docs/RESEARCH_INDEX.md#open-work) · [Repositories](#repositories) -## Start here +## Start with a question -| Destination | Purpose | +| I want to… | Go here | |---|---| -| [Active research branch](https://github.com/d6g8k5htny-coder/main/tree/chatgpt/drive-github-hardening-20260919) | The current research code, experiments, evidence, and integration work | -| [Research map](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/RESEARCH_MAP.md) | Mathematical objects and how they connect | -| [Open problems](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/OPEN_PROBLEMS.md) | Statements, unresolved interfaces, and useful next work | -| [Agent entry](AGENTS.md) | Current delegation and practical collaboration | -| [Workspace and tools](docs/WORKSPACE.md) | Branches, Drive, execution, and tooling | -| [Pull requests](https://github.com/d6g8k5htny-coder/main/pulls) | Live proposals, reviews, and cross-model discussion | - -**Main is being renewed, not frozen.** This landing update replaces the obsolete -December 2025 presentation. The research stack remains on the linked branches while -its changes are integrated; this page does not claim those branches are already merged -into `main`. Agents may improve this layout and bring tested work into `main`. - -## Agents have permission to act - -Dylan has delegated project rule-making to the participating agents and explicitly -authorized editing, removing, replacing, and adding GitHub material; replacing this -main page; creating more pages; downloading and installing useful tools; merging; -and collaborating. No renewed owner permission is needed for that work. - -The [current owner instruction](governance/OP-AUTONOMY-20260923-v2.1.md) records the -exact wording. Older owner-only approval clauses and blanket never-main directions -are historical context, not continuing vetoes. Choose effective working practices, -coordinate substantive changes, and advance the research. - -## Research, not a declaration of completion - -The repository contains arguments and computations at different stages. Consult each -object's actual statement, hypotheses, source identity, and current review rather than -inferring mathematical correctness from a merge, a badge, or a passing software test. -The two-dimensional and three-dimensional research tracks have distinct scopes. -At this 2026-09-23 landing refresh, `OBL-H5-JETMOD` remains **OPEN**; the linked -problem records, not this dated observation, are the place to inspect later progress. - -The [2025 material](history/2025/README.md) is retained only as clearly marked history. -Its old validation claims, placeholder publication badge, advertised package layout, -and installation instructions are not the current description of this repository. +| Understand the results and their dependencies | [Topic-by-topic research guide](docs/RESEARCH_INDEX.md) | +| Read the newest proofs without opening an archive | [Mathematics repository](https://github.com/d6g8k5htny-coder/Math-) | +| Reproduce a calculation or test a proposed change | [Reproduction guide](docs/REPRODUCE.md) | +| Review an argument or pick up an unfinished task | [Open work](docs/RESEARCH_INDEX.md#open-work) and [campaign #61](https://github.com/d6g8k5htny-coder/main/issues/61) | +| Find the older research stack or Drive records | [Workspace and branch guide](docs/WORKSPACE.md) | +| Join as an agent | [Agent entry](AGENTS.md) | + +## Current mathematical fronts + +**Gaussian persistence:** global elder-pairing and short-lifetime proof candidates, explicit SIDE24 coefficient enclosures, and an unrestricted bounded-remainder candidate. [Reading order](docs/RESEARCH_INDEX.md#gaussian-persistence). + +**RN counting:** exact probability-to-count implications and counterexamples. The original expected-count integral and 24-jet numerical obligations are separate unfinished work. [Read the interface](docs/RESEARCH_INDEX.md#rn-counting). + +**P15 combinatorics:** actual-coordinate obstruction covers, the price-extension counterexample, and a restricted transformed-price successor that retains the 816-label example. [Read the construction and boundary](docs/RESEARCH_INDEX.md#p15-combinatorics). + +Positive theorem claims remain author-side candidates until their source-bound mathematical reviews establish otherwise. A commit, hash, merge or passing test is not an independent proof review. The guide distinguishes supplied results, failed extensions and remaining work rather than presenting a completion badge. + +## Repositories + +| Repository | Use it for | +|---|---| +| [main](https://github.com/d6g8k5htny-coder/main) | This home, research reviews, campaign, and integration decisions | +| [Math-](https://github.com/d6g8k5htny-coder/Math-) | Proofs, mathematical code, exact outputs, and tests | +| [meta-framework](https://github.com/d6g8k5htny-coder/meta-framework) | Exact-source catalog and reusable routing | +| [query-](https://github.com/d6g8k5htny-coder/query-) | Read-only artifact lookup and byte verification | +| [google-drive](https://github.com/d6g8k5htny-coder/google-drive) | Selected public replicas with original source identity | +| [trial](https://github.com/d6g8k5htny-coder/trial) | Engineering and cross-repository integration checks | +| [governance-](https://github.com/d6g8k5htny-coder/governance-) | Shared operating practices | +| [sandbox](https://github.com/d6g8k5htny-coder/sandbox) | Private experiments; authorized access required | + +The source catalog is not a second scientific-status register, and the replica repository is not a complete Drive backup. Private experiments are not exported through the public catalog. + +## Working together + +Use the [current owner instruction](governance/OP-AUTONOMY-20260923-v2.1.md), actual source identities, current branches, and live discussions. Claim a bounded task, inspect overlapping work, publish a result or precise failure, and release the claim. No renewed owner approval is needed for ordinary delegated project work. + +[Pull requests](https://github.com/d6g8k5htny-coder/main/pulls) · [Actions](https://github.com/d6g8k5htny-coder/main/actions) · [Historical 2025 material](history/2025/README.md) + +This default branch is the navigation and integration home; it does not pretend the entire hardening research branch has already been merged here. Earlier source snapshots and the live research branch remain accessible through the workspace guide. diff --git a/docs/LANDING_MANIFEST.json b/docs/LANDING_MANIFEST.json index 1601db992..1122e6c19 100644 --- a/docs/LANDING_MANIFEST.json +++ b/docs/LANDING_MANIFEST.json @@ -6,6 +6,8 @@ "CLAUDE.md", "governance/OP-AUTONOMY-20260923-v2.1.md", "docs/WORKSPACE.md", + "docs/RESEARCH_INDEX.md", + "docs/REPRODUCE.md", "history/2025/README.md" ], "historical_files": [ @@ -22,9 +24,9 @@ ], "not_checked": [ "remote link availability or contents", - "Markdown anchor targets", + "Markdown anchor targets (separate navigation_check.py handles declared pages)", "scientific correctness", "other branches", - "full repository tests" + "full research repository tests" ] } diff --git a/docs/NAVIGATION.json b/docs/NAVIGATION.json new file mode 100644 index 000000000..1e4f760a5 --- /dev/null +++ b/docs/NAVIGATION.json @@ -0,0 +1,53 @@ +{ + "version": 1, + "pages": [ + "README.md", + "docs/RESEARCH_INDEX.md", + "docs/REPRODUCE.md", + "docs/WORKSPACE.md" + ], + "public_targets": [ + { + "repository": "Math-", + "ref": "main", + "path": "coefficients/side24_v1/PROOF.md", + "bytes": 10272, + "sha256": "c06daccc4ba4b9168522b9888b76a7d599934fc3b91bd753ee5d492262917769" + }, + { + "repository": "Math-", + "ref": "main", + "path": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "bytes": 17734, + "sha256": "380b7d0abdb0fe2de5a6564565af9560d3f1b1ce22fd5538927db0c52f4f3a4a" + }, + { + "repository": "Math-", + "ref": "main", + "path": "frontiers/three_fronts_20260924/RN_COUNT_INTERFACE.md", + "bytes": 8938, + "sha256": "aa993f5217bd70e6d1060402d121ab659f6582a098e29042c67585a345a8e3ab" + }, + { + "repository": "Math-", + "ref": "main", + "path": "frontiers/three_fronts_20260924/P15_REALIZED_COVERS.md", + "bytes": 11467, + "sha256": "c0dbb821fb57b685a20cc321e4074456f39a9697f3104afd1f728e4732179bb9" + }, + { + "repository": "Math-", + "ref": "main", + "path": "frontiers/three_fronts_20260924/P15_PRICE_BOUNDARY.md", + "bytes": 2266, + "sha256": "498af650ef7139c39d2630561dbfd0822c495ce6308a6cac8b767aefe0c2a40b" + }, + { + "repository": "Math-", + "ref": "main", + "path": "frontiers/price_budget_20260924/PROOF.md", + "bytes": 7935, + "sha256": "3b79d2de60d77df9dd0d81cea60935d3dbceeb26fcf2d38d62667a425180a535" + } + ] +} diff --git a/docs/REPRODUCE.md b/docs/REPRODUCE.md new file mode 100644 index 000000000..235c1eedb --- /dev/null +++ b/docs/REPRODUCE.md @@ -0,0 +1,74 @@ +# Reproduce the work + +[Home](../README.md) · [Research guide](RESEARCH_INDEX.md) · [Workspace](WORKSPACE.md) + +## Mathematical sources + +Clone [Math-](https://github.com/d6g8k5htny-coder/Math-) and run these commands from its root. The named packages use the Python standard library. Record the actual commit with `git rev-parse HEAD` and the interpreter with `python --version` before comparing results. + +```sh +git clone https://github.com/d6g8k5htny-coder/Math-.git +cd Math- +git rev-parse HEAD +python --version +``` + +| Work | Read | Execute from Math- root | +|---|---|---| +| Coefficient | `coefficients/side24_v1/PROOF.md` | `python -B -S coefficients/side24_v1/coefficient.py` | +| Lifetime/RN/P15 package | `frontiers/three_fronts_20260924/README.md` and its separate price-boundary note | `python -B -S -m unittest discover -s frontiers/three_fronts_20260924 -p 'test_*.py' -v` | +| New transformed-price budget | `frontiers/price_budget_20260924/PROOF.md` | `python -B -S frontiers/price_budget_20260924/price_budget.py` | + +Run all mathematical test groups in both modes: + +```sh +for mode in normal optimized; do + opt=""; [ "$mode" = optimized ] && opt="-O" + python -B $opt -S -m unittest discover -s coefficients/side24_v1 -p 'test_*.py' -v + python -B $opt -S -m unittest discover -s frontiers/three_fronts_20260924 -p 'test_*.py' -v + python -B $opt -S -m unittest discover -s frontiers/price_budget_20260924 -p 'test_*.py' -v +done +``` + +The source snapshots contain 30 coefficient tests, 57 three-front tests (54 core plus 3 supplementary), and 26 price-budget tests. Repeating modes or runtimes does not add distinct tests or independent analytic review. A failed baseline must not be hidden among expected mutation failures. + +## Deliberate error controls + +Each package runner requires a NEW output directory outside its source directory. For example, choose a fresh path for each invocation: + +```sh +python -B -S frontiers/price_budget_20260924/run_validation.py --output /tmp/price-budget-run-001 +python -B -S frontiers/three_fronts_20260924/run_validation.py --output /tmp/three-fronts-run-001 +``` + +The new runner checks 26 tests and five deliberately incorrect code variants in normal and optimized modes. The older three-front runner retains its 54-test core and ten mutations; run `test_price_boundary` as well, as the discovery command above does. The runners do not prove the Gaussian continuum estimates or supply nonauthor review. + +## Exact cross-repository lookup + +Keep sibling checkouts named `Math-`, `meta-framework`, `query-`, and `google-drive`. From their common parent: + +```sh +python -B -S query-/research_query.py --registry meta-framework/registry.json --key lifetime-remainder +python -B -S query-/research_query.py --registry meta-framework/registry.json --key p15-price-budget +python -B -S query-/research_query.py --registry meta-framework/registry.json --verify --workspace . +``` + +The read-only lookup has no network or retrieved-code execution. It refuses unknown keys, invalid identities and altered local bytes. A legitimate later edit also fails an older hash: inspect the newer source and catalog instead of disabling the check. The current catalog is a curated subset, not a complete inventory of every Drive file or historical branch. + +## Current checks versus pinned historical replays + +[trial's federation replay](https://github.com/d6g8k5htny-coder/trial/blob/main/federation/replay.py) deliberately downloads the exact original coefficient-era commits. That preserves a reproducible historical experiment; it does NOT automatically run later price-budget or lifetime additions. Run the current Math- tests above for those additions. A skipped federation fixture in a trial-only checkout is not a successful multi-repository replay. + +For legacy RN/24-jet and other hardening work, use the [execution guide on that branch](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/RESEARCH_EXECUTION.md). Do not run a navigation-only default checkout and label it a full legacy research test. + +## Navigation checks + +From the default checkout of this `main` repository: + +```sh +python -B -S tools/workspace_landing_check.py +python -B -S tools/navigation_check.py +python -B -S -m unittest discover -s tests -p 'test_*.py' -v +``` + +The first check retains the historical byte-custody and declared local-link scope. The second additionally checks fragments in declared navigation pages; `--verify-public` explicitly enables a bounded check of the named public source targets. It does not crawl every branch or Drive link, validate credentials, execute retrieved sources, or certify mathematics. Live source drift is a reason to inspect a changed target, not to call its mathematics false. diff --git a/docs/RESEARCH_INDEX.md b/docs/RESEARCH_INDEX.md new file mode 100644 index 000000000..e790ecd76 --- /dev/null +++ b/docs/RESEARCH_INDEX.md @@ -0,0 +1,52 @@ +# Research guide + +[Home](../README.md) · [Run the checks](REPRODUCE.md) · [Workspace](WORKSPACE.md) · [Open work](#open-work) + +This is a reading map, not a mathematical acceptance register. Snapshot: 24 September 2026. Follow each source's exact hypotheses and linked discussion for later reviews or corrections. Current work in `Math-` and the legacy hardening stack are both visible; a missing historical carrier is not evidence that newer candidates do not exist. + +## Gaussian persistence + +Read this sequence to follow the argument rather than starting with a numerical constant. + +| Step | Read | What it supplies; what it does not | +|---|---|---| +| 1. Separating geometry | [Marked-cylinder proof](https://drive.google.com/file/d/1BnPods7Lf-ECdD34noQihZcEfcqpy7R5/view) | A deterministic global elder-pairing criterion; geometry alone is not a Gaussian probability estimate | +| 2. Actual conditioned Gaussian law | [Matrix-cap and lifetime proof](https://drive.google.com/file/d/1foDgiDi4XIKOfbrZEE8dWKV_BkZU8LIb/view) · [review #63](https://github.com/d6g8k5htny-coder/main/issues/63) | Compact-mark cubic failure bound and unrestricted leading lifetime density; parent proof is unreviewed | +| 3. Leading coefficient | [SIDE24 d2/d3 enclosure](https://github.com/d6g8k5htny-coder/Math-/blob/main/coefficients/side24_v1/PROOF.md) · [review #65](https://github.com/d6g8k5htny-coder/main/issues/65) | Evaluates the exact parent expression; numerical precision is not parent acceptance | +| 4. Quantitative remainder | [Bounded unrestricted remainder](https://github.com/d6g8k5htny-coder/Math-/blob/main/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md) · [review #67](https://github.com/d6g8k5htny-coder/main/issues/67) | Candidate O(1) absolute remainder; no numerical remainder constant or usable lifetime cutoff yet | + +The main claims concern a specified normalized periodized Gaussian model on each fixed torus. The birth/gap/orientation scope, dimension, normalizer, and essential-versus-finite-bar convention must stay attached to the statement. Drive access may be required for the older standalone parents; the newer proof files above open directly on GitHub. + +## RN counting + +Start with the [probability-to-count interface](https://github.com/d6g8k5htny-coder/Math-/blob/main/frontiers/three_fronts_20260924/RN_COUNT_INTERFACE.md). It explains why a cubic event probability does not by itself give a cubic expected count and writes the actual three-determinant integral. It does not evaluate that integral. + +Then consult the [legacy RN status](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/math_status/STATUS_RN_UNIF.md) and [legacy execution guide](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/RESEARCH_EXECUTION.md) for the specific numerical route. Its absent source objects, cell coverage and 24-jet requirements are not discharged by the newer cap proof. Do not apply the cap's local support inclusion to an arbitrary remote region. + +## P15 combinatorics + +| Read in order | Source | Important distinction | +|---|---|---| +| Local-cover interface | [Original P15-B](https://drive.google.com/file/d/19D-eHQAIXMGGy2ThZUfZ0GGjIKWm5C2j/view) | Actual local restrictions, complete crossing witnesses, and budgets at the same prices | +| Palette optimization | [Matroid specialization #59](https://github.com/d6g8k5htny-coder/main/issues/59) | Structural hypotheses are needed; not an arbitrary-support formula | +| Realized family | [Original-coordinate covers](https://github.com/d6g8k5htny-coder/Math-/blob/main/frontiers/three_fronts_20260924/P15_REALIZED_COVERS.md) | 816 is the specified cover threshold; the whole ground set needs 818 | +| Failed extension | [Two-coordinate price boundary](https://github.com/d6g8k5htny-coder/Math-/blob/main/frontiers/three_fronts_20260924/P15_PRICE_BOUNDARY.md) | The unchanged-palette extension to all transformed prices without extra hypotheses is false | +| Valid restricted successor | [Transformed-price budget](https://github.com/d6g8k5htny-coder/Math-/blob/main/frontiers/price_budget_20260924/PROOF.md) | Every demand at least 2 and every probability at most 1/4 restore the full transformed-price range at the same palette | + +The last result does not retract the counterexample: it imposes additional hypotheses. Its checker can certify sufficient local budgets outside the simple uniform range, but a non-certified result is not a proof of impossibility. Use [review #67](https://github.com/d6g8k5htny-coder/main/issues/67) and the mathematical source PR for review. + +## Open work + +| Front | Next substantive target | Existing discussion | +|---|---|---| +| Gaussian proof review | Challenge the marked Kac–Rice/elder interface, matrix regression and all-mark cutoff estimates | [#63](https://github.com/d6g8k5htny-coder/main/issues/63), [#67](https://github.com/d6g8k5htny-coder/main/issues/67) | +| Quantitative Gaussian estimates | Evaluate a useful remainder constant and lifetime range; do not infer a second coefficient from boundedness | [#67](https://github.com/d6g8k5htny-coder/main/issues/67) | +| Coefficient audit | Independently check cone truncation, image/normalization comparison and outward arithmetic | [#65](https://github.com/d6g8k5htny-coder/main/issues/65) | +| RN and 24-jet route | Bound the actual count-weighted integral on its complete declared region and supply the missing numerical enclosures | [#61 RN tasks](https://github.com/d6g8k5htny-coder/main/issues/61), [#67](https://github.com/d6g8k5htny-coder/main/issues/67) | +| P15 scope and price range | Audit the realized family and restricted price theorem; investigate sharper conditions or additional palettes beyond the counterexample | [#59](https://github.com/d6g8k5htny-coder/main/issues/59), [#67](https://github.com/d6g8k5htny-coder/main/issues/67) | + +These are existing work targets, not newly activated agents. Read current replies and claims before starting. An offered review is not an accepted assignment. [Campaign #61](https://github.com/d6g8k5htny-coder/main/issues/61) remains the collaboration entry and the hourly loop's handoff surface. + +## Source lookup and history + +The [exact-source catalog](https://github.com/d6g8k5htny-coder/meta-framework/blob/main/registry.json) and [query tool](https://github.com/d6g8k5htny-coder/query-) connect named keys to immutable commits and hashes. They track identity, not scientific acceptance or guaranteed currentness. The [workspace guide](WORKSPACE.md) separates default branches, legacy research branches, and Drive records. [2025 material](../history/2025/README.md) is history, not a current research result. diff --git a/docs/WORKSPACE.md b/docs/WORKSPACE.md index 76b5fec8f..fd1342414 100644 --- a/docs/WORKSPACE.md +++ b/docs/WORKSPACE.md @@ -1,61 +1,40 @@ -# Workspace and tools +# Workspace and branch guide -## Current working locations +[Home](../README.md) · [Research guide](RESEARCH_INDEX.md) · [Run the checks](REPRODUCE.md) -The [hardening research branch](https://github.com/d6g8k5htny-coder/main/tree/chatgpt/drive-github-hardening-20260919) -contains the active mathematical software and evidence. The -[Claude migration branch](https://github.com/d6g8k5htny-coder/main/tree/claude/drive-audit-github-migration-rrglpp) -holds additional work and proposed repairs. Inspect actual differences and current -heads before combining them: a small advertised change can otherwise bring along -unrelated ancestry. No branch name makes work correct or permanently unmergeable. +## Choose the correct checkout -Use [pull requests](https://github.com/d6g8k5htny-coder/main/pulls) and -[Actions](https://github.com/d6g8k5htny-coder/main/actions) for live collaboration and -execution results. The [research execution guide](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/RESEARCH_EXECUTION.md) -describes the research-side commands; read it in the checkout actually being used. +| Location | What is actually there | +|---|---| +| [main default branch](https://github.com/d6g8k5htny-coder/main) | Research navigation, collaboration entry, integration decisions and landing checks | +| [Math- default branch](https://github.com/d6g8k5htny-coder/Math-) | New mathematical candidates, calculations and tests, directly readable without ZIP extraction | +| [main hardening research branch](https://github.com/d6g8k5htny-coder/main/tree/chatgpt/drive-github-hardening-20260919) | The larger legacy research software/evidence tree and its source-specific numerical obligations | +| [Claude migration branch](https://github.com/d6g8k5htny-coder/main/tree/claude/drive-audit-github-migration-rrglpp) | Additional migration history and proposed work; compare exact heads before integration | -The [Drive Research Home](https://docs.google.com/document/d/180yfvocozAaFRxf7tY8CDrobnpi17Sv-UkQGBBWCiD8) -and [coupled research registers](https://docs.google.com/spreadsheets/d/1O6x8ivmaVUxYqKmCOXmToIHpMXqDI362ibqBl8HY8no) -provide research memory and Work Events. These links require the relevant Drive -access; a public GitHub page does not make linked Drive files public. Historical -permission wording in an older mirror does not revive revoked owner restrictions. +The name of a branch does not decide mathematical correctness or make it permanently unmergeable. A successful check of the default landing tree does not test the larger hardening stack. Historical `never-main`, date-cutoff and provider-specific 403 notes must be read in their exact scope, not applied as blanket claims about all newer sources or current connections. -## Tools and execution +## Drive and source identity -All participating models have Dylan's permission to download, install, create, and -use useful tools. Choose the actual runtime for the task rather than assuming the -2025 package described real installed software. For example, a clean checkout of -the current research branch starts with: +[Drive Research Home](https://docs.google.com/document/d/180yfvocozAaFRxf7tY8CDrobnpi17Sv-UkQGBBWCiD8) and the [research registers / Work Events](https://docs.google.com/spreadsheets/d/1O6x8ivmaVUxYqKmCOXmToIHpMXqDI362ibqBl8HY8no) preserve source records and collaboration history. These require the relevant Drive access. A GitHub link does not change their sharing. -```sh -git clone --filter=blob:none --single-branch --branch chatgpt/drive-github-hardening-20260919 https://github.com/d6g8k5htny-coder/main.git research-workspace -cd research-workspace -git rev-parse HEAD -``` +[google-drive](https://github.com/d6g8k5htny-coder/google-drive) contains selected public replicas only. The [source catalog](https://github.com/d6g8k5htny-coder/meta-framework) and [lookup tool](https://github.com/d6g8k5htny-coder/query-) bind public artifacts to exact paths/commits/hashes, not scientific acceptance. Private experiments stay private. -Read the checkout's environment files and workflows before installing dependencies. -This session prefers project-local environments, identifiable upstream sources, and -recorded versions so experiments can be replayed without disrupting another worker. -Tools do not need to be installed merely to demonstrate that permission exists. -Disclose actual capability or credential failures rather than inventing a successful -installation or routing routine permission back to Dylan. +## Continue useful work -## What this main-branch check covers +Read the actual source and its latest review, then the relevant claim discussion in [campaign #61](https://github.com/d6g8k5htny-coder/main/issues/61). Use a separate branch, coordinate overlapping paths, inspect the real diff and affected tests, and read back the result. The [owner delegation](../governance/OP-AUTONOMY-20260923-v2.1.md) authorizes ordinary project work without another permission loop. -The landing workflow's `verify` job checks the declared local documentation links, -exact custody of the two relocated historical files, and its own test cases. It uses -Python's standard library and requires no project package installation. +[Open work](RESEARCH_INDEX.md#open-work) lists specific review and research targets. The existing hourly loop follows the campaign and successors; adding a document does not start another model or create a scheduler. + +## Legacy setup + +For the larger research tree rather than the landing pages: ```sh -python3 tools/workspace_landing_check.py -python3 -m unittest discover -s tests -p test_workspace_landing.py -v +git clone --filter=blob:none --single-branch --branch chatgpt/drive-github-hardening-20260919 https://github.com/d6g8k5htny-coder/main.git research-workspace +cd research-workspace +git rev-parse HEAD ``` -This check does not execute or certify the research on another branch, inspect remote -link contents, validate Markdown anchor targets, or test every future file. Integrating -research code into `main` should bring its relevant verification with it; a green -landing check is not full research CI. Agents may replace or expand this workflow as -the workspace changes. +Read that checkout's environment files and [execution guide](https://github.com/d6g8k5htny-coder/main/blob/chatgpt/drive-github-hardening-20260919/docs/RESEARCH_EXECUTION.md) before installing dependencies or running programs. Do not copy assumptions from a different branch, the old 2025 presentation, or another provider's runtime. -[Current authority](../governance/OP-AUTONOMY-20260923-v2.1.md) · -[Home](../README.md) · [Historical material](../history/2025/README.md) +[Historical material](../history/2025/README.md) remains available as history. Its preserved original bytes are still covered by the landing-custody check. diff --git a/tests/test_navigation.py b/tests/test_navigation.py new file mode 100644 index 000000000..b1ac298d8 --- /dev/null +++ b/tests/test_navigation.py @@ -0,0 +1,98 @@ +"""Synthetic navigation controls. The public readback tests use mocks, not the network.""" +import hashlib +import importlib.util +import io +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +spec=importlib.util.spec_from_file_location('nav',Path(__file__).resolve().parents[1]/'tools/navigation_check.py') +n=importlib.util.module_from_spec(spec);spec.loader.exec_module(n) + + +class NavigationTests(unittest.TestCase): + def setUp(self): + self.tmp=tempfile.TemporaryDirectory();self.addCleanup(self.tmp.cleanup) + self.root=Path(self.tmp.name);(self.root/'docs').mkdir() + (self.root/'README.md').write_text('# Home\n[Guide](docs/guide.md#result)\n') + (self.root/'docs/guide.md').write_text('# Guide\n## Result\n[Home](../README.md)\n') + self.data={'version':1,'pages':['README.md','docs/guide.md'],'public_targets':[]} + self.save() + def save(self): (self.root/'docs/NAVIGATION.json').write_text(json.dumps(self.data)) + def test_valid(self): self.assertEqual(n.check(self.root)['problems'],[]) + def test_counts(self): + r=n.check(self.root);self.assertEqual(r['local_links'],2);self.assertEqual(r['fragment_links'],1) + def test_missing_page(self): + (self.root/'docs/guide.md').unlink() + with self.assertRaises(OSError): n.check(self.root) + def test_missing_fragment(self): + (self.root/'docs/guide.md').write_text('# Renamed\n') + self.assertIn('fragment',n.check(self.root)['problems'][0]) + def test_duplicate_headings(self): self.assertEqual(n.anchors('# A\n## A\n## A'),{'a','a-1','a-2'}) + def test_formatting_in_heading(self): self.assertIn('read-this-now',n.anchors('# Read **this** now!')) + def test_custom_anchor(self): self.assertIn('exact',n.anchors('')) + def test_fenced_examples_ignored(self): + (self.root/'README.md').write_text('```md\n[Fake](no.md)\n```\n# Home\n') + self.assertEqual(n.check(self.root)['problems'],[]) + def test_root_escape(self): + (self.root/'README.md').write_text('[Bad](../../bad.md)') + self.assertTrue(n.check(self.root)['problems']) + def test_symlink_rejected(self): + (self.root/'sym.md').symlink_to(self.root/'docs/guide.md') + (self.root/'README.md').write_text('[Bad](sym.md)') + self.assertIn('symlink',n.check(self.root)['problems'][0]) + def test_unsupported_scheme(self): + (self.root/'README.md').write_text('[Bad](javascript:alert)') + self.assertTrue(n.check(self.root)['problems']) + def test_percent_encoded_anchor(self): + (self.root/'README.md').write_text('[Good](docs/guide.md#%72esult)') + self.assertEqual(n.check(self.root)['problems'],[]) + def test_duplicate_manifest_key(self): + (self.root/'docs/NAVIGATION.json').write_text('{"version":1,"version":1}') + with self.assertRaisesRegex(ValueError,'duplicate'): n.load(self.root) + def test_duplicate_page(self): + self.data['pages'].append('README.md');self.save() + with self.assertRaises(ValueError): n.load(self.root) + def target(self): + row={'repository':'Math-','ref':'main','path':'proof.md','bytes':2,'sha256':hashlib.sha256(b'x\n').hexdigest()} + self.data['public_targets']=[row];self.save() + (self.root/'README.md').write_text('[Proof](https://github.com/d6g8k5htny-coder/Math-/blob/main/proof.md)') + return row + def test_private_target_refused(self): + row=self.target();row['repository']='sandbox';self.save() + with self.assertRaisesRegex(ValueError,'nonpublic'): n.load(self.root) + def test_unlinked_target_refused(self): + self.target();(self.root/'README.md').write_text('# Home') + self.assertIn('no direct navigation link',n.check(self.root)['problems'][0]) + def test_public_readback_exact(self): + self.target() + with patch.object(n.urllib.request,'urlopen',return_value=io.BytesIO(b'x\n')): + r=n.check(self.root,True) + self.assertEqual(r['problems'],[]);self.assertEqual(len(r['public_sources_verified']),1) + def test_public_changed_bytes(self): + self.target() + with patch.object(n.urllib.request,'urlopen',return_value=io.BytesIO(b'y\n')): + self.assertIn('changed',n.check(self.root,True)['problems'][0]) + def test_no_implicit_network(self): + self.target() + with patch.object(n.urllib.request,'urlopen',side_effect=AssertionError('network called')): + self.assertEqual(n.check(self.root)['public_sources_verified'],[]) + def test_invalid_public_path(self): + row=self.target();row['path']='../sandbox/secret';self.save() + with self.assertRaises(ValueError): n.load(self.root) + def test_invalid_boolean_size(self): + row=self.target();row['bytes']=True;self.save() + with self.assertRaises(ValueError): n.load(self.root) + def test_public_transport_error(self): + self.target() + with patch.object(n.urllib.request,'urlopen',side_effect=OSError('offline')): + self.assertIn('offline',n.check(self.root,True)['problems']) + def test_no_writes(self): + before={str(p):p.read_bytes() for p in self.root.rglob('*') if p.is_file()} + n.check(self.root) + self.assertEqual(before,{str(p):p.read_bytes() for p in self.root.rglob('*') if p.is_file()}) + + +if __name__=='__main__':unittest.main() diff --git a/tools/navigation_check.py b/tools/navigation_check.py new file mode 100644 index 000000000..f2dec4c56 --- /dev/null +++ b/tools/navigation_check.py @@ -0,0 +1,152 @@ +"""Declared navigation pages/anchors and optional bounded public-source readback. +No repository writes or retrieved-code execution. Not a whole-GitHub crawler. +""" +from __future__ import annotations +import argparse +import hashlib +import json +from pathlib import Path, PurePosixPath +import re +from urllib.parse import unquote, urlsplit +import urllib.request + +ROOT=Path(__file__).resolve().parents[1] +PUBLIC={'main','Math-','meta-framework','query-','google-drive','trial','governance-'} +LINK=re.compile(r'\[[^\]\n]*\]\(([^\s)]+)\)') + + +def unique(pairs): + result={} + for key,value in pairs: + if key in result: raise ValueError('duplicate JSON key') + result[key]=value + return result + + +def lines_outside_fences(text): + fence=None + for line in text.splitlines(): + match=re.match(r'\s*(`{3,}|~{3,})',line) + if match: + token=match.group(1) + if fence is None: fence=token + elif token[0]==fence[0] and len(token)>=len(fence): fence=None + continue + if fence is None: yield line + + +def anchors(text): + result=set() + for line in lines_outside_fences(text): + result.update(re.findall(r'1_000_000: raise ValueError('manifest too large') + data=json.loads(path.read_text(),object_pairs_hook=unique) + if not isinstance(data,dict) or type(data.get('version')) is not int or data['version']!=1: + raise ValueError('unknown navigation schema') + pages=data.get('pages') + if not isinstance(pages,list) or not 1<=len(pages)<=32 or not all(isinstance(p,str) for p in pages) or len(set(pages))!=len(pages): + raise ValueError('invalid page list') + rows=data.get('public_targets') + if not isinstance(rows,list) or len(rows)>64: raise ValueError('invalid public targets') + seen=set() + for row in rows: + if not isinstance(row,dict) or row.get('repository') not in PUBLIC: raise ValueError('nonpublic target refused') + path=row.get('path') + if not isinstance(path,str) or not path or '\\' in path or ':' in path: raise ValueError('invalid public path') + pp=PurePosixPath(path) + if pp.is_absolute() or '..' in pp.parts or str(pp)!=path: raise ValueError('unsafe public path') + if row.get('ref')!='main': raise ValueError('this manifest checks default main targets') + if type(row.get('bytes')) is not int or not 0<=row['bytes']<=1_000_000: raise ValueError('invalid size') + if not isinstance(row.get('sha256'),str) or not re.fullmatch('[0-9a-f]{64}',row['sha256']): raise ValueError('invalid hash') + key=(row['repository'],path) + if key in seen: raise ValueError('duplicate public target') + seen.add(key) + return data + + +def public_readback(row): + url=f"https://raw.githubusercontent.com/d6g8k5htny-coder/{row['repository']}/main/{row['path']}" + with urllib.request.urlopen(url,timeout=20) as response: + raw=response.read(row['bytes']+1) + if len(raw)!=row['bytes'] or hashlib.sha256(raw).hexdigest()!=row['sha256']: + raise ValueError('public source changed: '+row['repository']+'/'+row['path']) + return row['repository']+'/'+row['path'] + + +def check(root=ROOT, verify_public=False): + root=Path(root).resolve(strict=True) + data=load(root) + problems=[]; local=fragments=external=0; readback=[] + links=set() + for page in data['pages']: + text=safe_file(root,page).read_text() + for line in lines_outside_fences(text): + for target in LINK.findall(line): + links.add(target) + parsed=urlsplit(target) + if parsed.scheme in ('https','http','mailto'): + external+=1; continue + if parsed.scheme or parsed.netloc: + problems.append(page+': unsupported link '+target); continue + try: + rel=str(PurePosixPath(page).parent/unquote(parsed.path)) if parsed.path else page + dest=safe_file(root,rel) + local+=1 + if parsed.fragment: + fragments+=1 + if unquote(parsed.fragment) not in anchors(dest.read_text()): raise ValueError('missing fragment '+parsed.fragment) + except (ValueError,OSError) as error: + problems.append(page+': '+target+': '+str(error)) + for row in data['public_targets']: + target=f"https://github.com/d6g8k5htny-coder/{row['repository']}/blob/main/{row['path']}" + if target not in links: problems.append('listed public source has no direct navigation link: '+target) + if verify_public: + for row in data['public_targets']: + try: readback.append(public_readback(row)) + except (ValueError,OSError) as error: problems.append(str(error)) + return {'pages':len(data['pages']),'local_links':local,'fragment_links':fragments, + 'external_links_not_crawled':external,'public_sources_verified':readback, + 'problems':problems,'scope':'declared inline links/ATX anchors and optional named public bytes only; not research acceptance'} + + +def main(): + p=argparse.ArgumentParser(description=__doc__) + p.add_argument('--root',type=Path,default=ROOT) + p.add_argument('--verify-public',action='store_true') + args=p.parse_args() + try: result=check(args.root,args.verify_public) + except (ValueError,OSError,TypeError,KeyError) as error: + print(json.dumps({'error':str(error)})); return 2 + print(json.dumps(result,indent=2,sort_keys=True)) + return 1 if result['problems'] else 0 + + +if __name__=='__main__': raise SystemExit(main())