Repository navigation
Conversation
0.7.0 deprecated it for 0.8.0 (#601): links set gives an article its article_id, and migrate links gives one to each annotation it writes. Its plan, its write and the autoform-article-id-plan/v1 schema go, and nothing replaces its --check gate. article_identity.py keeps the three helpers links set and migrate links use: the proposed ID, the regular-file read and the replacement that refuses a changed file. The tests of the plan, the write and the command go. The helpers keep direct tests of what migrate links relies on: the proposed ID's form, the symlink refusal, the kept file mode with and without fchmod, and the refusal of a file changed before or during the replacement.
Contributor
Author
|
Review at 17271f3: no blocker. I checked it against path identity's next step and against
Notes, none blocking:
Checks: this PR's CI on 17271f3, every job passed (https://github.com/facebookresearch/autoform-bot/actions/runs/43363927528). The 6 mutants of the code commit were each caught (https://github.com/facebookresearch/autoform-bot/actions/runs/43190587234); the CHANGELOG commit changes no code. Posted by Claude Code, at Jack's request. |
… into removal/migrate-article-ids # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Premise
article_idwithautoform migrate article-ids, and maintainers of the code behind it.autoform migrate article-idsfor removal in 0.8.0 (Read literature-links annotations as an article's Lean link #601). It still prints awarning[deprecated]:line on every run, and its plan, its frontmatter writer and itsautoform-article-id-plan/v1schema still ship.autoform links set BLUEPRINT ARTICLEgives an article itsarticle_id, andautoform migrate links blueprint --writegives one to each annotation it writes. Nothing replaces the--checkgate or the--jsonplan, as 0.7.0's notes said.plan_article_ids,write_article_ids,ArticleIdWriteError, the entry and plan classes,IDENTITY_PLAN_SCHEMAand the frontmatter writer_with_article_id.Line delta: +73/-552 in total.
article_identity.py+1/-180,__main__.py+1/-59,links_migration.py+1/-1);CHANGELOG.md);tests/test_article_identity.py+47/-284,tests/test_annotations.py-24,tests/test_links_migration.py+15/-4).What changes
autoform migrate article-idsfails as an invalid choice, exit 2 from argparse.autoform migratekeepslinks, which now dispatches directly.article_identity.pykeeps only the three helperslinks setandmigrate linksimport:_proposed_id, the ID a new article is proposed;_read_regular, which reads a regular file and refuses anything else; and_replace_if_unchanged, which replaces a file unless it changed since it was read. They stay where they are: moving_proposed_idintolinks_migration.pywould makelinks_set.pyimport it, andlinks_migration.pyalready importslinks_set.py. The graph still readsarticle_iduntil 0.9.0, unchanged.skills/setupfile runsmigrate article-ids, onmainor in any release, so neither copy ofautoform_audit.pychanges. Their onearticle_idline validates the assumption contract, which the 0.9.0 removal of article IDs owns.tests/test_article_identity.py's 17 plan, write and CLI tests, andtests/test_annotations.py's two tests of--writebesideblueprint/links/.article_idstay.migrate linksrelies on, and no other test did, the helper now has a direct test: refusing a symlink, keeping the file mode with and withoutos.fchmod, and refusing a file changed before or during the replacement. A new test checks that the proposed ID is deterministic and well formed, as the deleted plan test did, and that it depends on both the path and the source hash.tests/test_graph.pycovers for loading.tests/test_links_migration.py's two tests that took the expected ID fromplan_article_idstake it from_proposed_id. A new CLI test checks thatmigrate article-idsexits 2 as an invalid choice.Checks
mainat 8c618dc: every job passed. That coversteston 3.11 and 3.13 (7,171 and 7,170 passed, ruff included), the real-Lean, skeleton and REPL suites, WebKit, Windows and the Node read-back cards.https://github.com/facebookresearch/autoform-bot/actions/runs/43190503980
os.fchmodis missing, the proposed ID ignoring the source hash or the path, andmigrate article-idsrestored.https://github.com/facebookresearch/autoform-bot/actions/runs/43190587234
ruff checkwith the pinned 0.15.17 on the changed Python files: clean.git merge-tree, withmainat 8c618dc and the open PRs' heads as of 2026-11-13 01:57Z: this commit adds no conflict with any of them. Prove2me - Add skill files and modifications to the autoform-bot CLI to allow for easy integration with prove2.me #351 and fix(site): check links and cards in the HTML5 element tree #621 already conflict withmain, in files this PR doesn't touch, and the others merge cleanly.make lintandmake test, through CI on scratch.Posted by Claude Code, at Jack's request.