Repository navigation
Conversation
The Pages workflow deployed on every matching push to main without waiting for autoform verify, so the public site could show a theorem as proved for a commit whose build or audit failed. It now runs on workflow_run of autoform verify and builds and deploys only when that run succeeded for a push to main from this repository; a fork's pull request can carry head_branch main, so the event and head repository are checked too. It checks out the verified commit and passes it to render --ref, since GITHUB_SHA under workflow_run is main's current head and the permalinks would otherwise point at a different commit. Pull requests still build without deploying, and workflow_dispatch now does the same: a maintainer redeploys by re-running the latest verify run. workflow_run has no paths filter and verify runs on every push to main, so every verified push redeploys rather than only those touching the old paths.
The source index kept the first lexical definition of each name, so when an unbuilt draft file repeated a built declaration's full name, the site linked the draft while CI built and audited the other one, and check passed. The index now also records every definition of a name that resolves to more than one declaration, and check --lean-root fails, listing each path:line, when an article names one. The Pages workflow runs that check before rendering, so the deploy stops too. Full names are still derived from namespaces as before. A private declaration counts by the name its source writes, as impact resolves it: two private ones with no public one are ambiguous, while a public one and private ones in other files are distinct in Lean. Which declaration find returns is unchanged, and render, audit, doctor and skeleton keep using it.
|
This needs changes before review:
|
|
Re-review confirms the prior blockers remain at The Pages privilege split is otherwise sound, but the rebuild also needs two changes: gate |
Historical note: this was drafted as two commits on #115. That base closed unmerged; preserve the design record here and rebuild the unique work as described above.
This fixes two gaps from the #115 contract audit that already exist on
main: H3, and the second half of H4.What was wrong
blueprint-pages.ymldeployed on every matching push tomainwithout waiting forautoform verify. The public site could therefore show a theorem as fully proved for a commit whose build or audit failed.checkpassed.Changes
workflow_runofautoform verify. It builds and deploys only when that run succeeded for a push tomainfrom this repository. A fork's pull request can carryhead_branch: main, so the event and the head repository are checked too.render --ref. Underworkflow_run,GITHUB_SHAis main's current head, so without this the permalinks would point at a different commit.workflow_dispatchnow does the same. A maintainer redeploys by re-running the latest verify run onmain.check --lean-rootfails, listing eachpath:line, when an article names such a name. The Pages workflow runs that check before rendering, so the deploy stops too.work impactresolves it. Two private ones with no public one are ambiguous. A public one and private ones in other files are distinct in Lean, so they are not.findreturns is unchanged, and render, audit, doctor and skeleton keep using it.Tests
New:
tests/test_graph.py::test_check_cli_refuses_a_lean_name_defined_more_than_oncetests/test_lean_sources.py::test_a_name_defined_in_two_files_keeps_the_first_and_records_bothtests/test_lean_sources.py::test_the_same_short_name_in_two_namespaces_is_not_a_duplicatetests/test_lean_sources.py::test_private_names_collide_only_when_no_public_one_winstests/test_skill_examples.pychecks the new Pages triggers and conditions in both workflow copies.Local runs at
a5fec94:ruff check autoform_cli servers tests: clean.AUTOFORM_REQUIRE_REAL_LEAN_TESTS=1),tests/test_lake_artifact_audit.py tests/test_impact.py tests/test_contract.py: 136 passed, 1 skipped. The skip istest_helper_runs_on_python_310, because python3.10 is not installed on this machine.tests/test_scaffold.pypin tests. They fail only because my local clone has nooriginremote, soplugin_pin()finds no pin. In a clone withoriginthey pass (63 of 63), and they pass in CI.Caveats
workflow_runtrigger and its conditions have not run on GitHub. They cannot be exercised locally, so the first verified push tomainin a project that takes this workflow is the first real test.workflow_runhas no paths filter and verify runs on every push tomain, so every verified push redeploys, even one that changes nothing the site shows.maintherefore keeps its last verified site untilmainis green again.