Repository navigation
[oss-candidate] rework r1: goauthentik/authentik#26402 - #2
Conversation
Verification at 07efd06Verified the move against submitted base $ /agent-workspace/tmphome/akvenv/bin/python /agent-output/oss/authentik/probe-move-equivalence.py /agent-workspace/oss/authentik-wt-breaker-submitted /agent-workspace/oss/authentik-wt-breaker-r1
# arm: fixed (/agent-workspace/oss/authentik-wt-breaker-submitted)
# arm: fixed (hash.py) (/agent-workspace/oss/authentik-wt-breaker-r1)
SAME: plain 56725a46a4fd08c8
SAME: invalid c2d03c6efb16c3f8
SAME: readable c537c8202499f0d9
SAME: missing 9331d0102349acd1
SAME: nested 2b719393e40aef25
SAME: mapping f577d2d21072f02d
SAME: nul 82bdccca167db98f
SAME: two 70b0860a44f85540
SAME: alias 220cd73658040de8
9 identical, 0 differ across 2 armsThe existing issue reproduction also passes on both arms (the three regression cases distinguish the original unmodified main, not the submitted base for this move): $ /agent-workspace/tmphome/akvenv/bin/python /agent-output/oss/authentik/repro.py /agent-workspace/oss/authentik-wt-breaker-submitted
# arm: fixed (/agent-workspace/oss/authentik-wt-breaker-submitted)
PASS: test_file_tag_content_changed — 8371900b34c448c4 vs 84e4a8d327ffb676
PASS: test_file_tag_content_changed_nested — 5e5dc22e3f76fa5a vs 5792dac137ee5e39
PASS: test_file_tag_created — 4895fbca5843dd88 vs 2180afa51267f430
PASS: test_file_tag_content_unchanged (control)
PASS: test_file_tag_missing (control)
PASS: test_file_tag_path_from_tag (control)
PASS: plain blueprint hash unchanged (control)
PASS: invalid yaml hash unchanged (control)
8 passed, 0 failed
$ /agent-workspace/tmphome/akvenv/bin/python /agent-output/oss/authentik/repro.py /agent-workspace/oss/authentik-wt-breaker-r1
# arm: fixed (hash.py) (/agent-workspace/oss/authentik-wt-breaker-r1)
PASS: test_file_tag_content_changed — 87a273a96ac5af46 vs 5d3c1f23a6399d2e
PASS: test_file_tag_content_changed_nested — 16228ea49c7895cb vs 738ce37e05869dc0
PASS: test_file_tag_created — efe9a9cb5fb89758 vs 7d84d19b29933d6d
PASS: test_file_tag_content_unchanged (control)
PASS: test_file_tag_missing (control)
PASS: test_file_tag_path_from_tag (control)
PASS: plain blueprint hash unchanged (control)
PASS: invalid yaml hash unchanged (control)
8 passed, 0 failed
Rules: prior-art-recheck-at-gate=covered(main commit 35aa0b1 and issue state) | formatter-at-the-pinned-version=covered(black 26.5.1, ruff 0.16.10) | reads-as-generated=covered(whole round diff grep) | tests-sized-to-the-bug=covered(no test added for equivalent move) |
sprayberry-redline
left a comment
There was a problem hiding this comment.
Approve. The extraction preserves the hashing definitions and their dependencies, with both task call sites using the imported function. The reply accurately describes the move and why the existing task-level tests remain unchanged.
No CI checks are reported for this branch; verification records equivalent results across nine boundary probes, while the database-backed Django tests remain unrun at this head.
Maintainer said
BeryJu, 2026-10-08 12:20 UTC, goauthentik#26402 (comment) (after approving the PR at goauthentik#26402 (review)):
Change
One commit,
07efd0633, onfix/blueprint-file-tag-hash-r1, cut from the submitted head3d788d473.authentik/blueprints/v1/hash.py(new, 60 lines):iter_file_tags,MISSING_FILE_MARKERandblueprint_hash, byte-for-byte the definitions that sat intasks.pyon the submitted head (diffof the two function bodies is empty apart from the trailing blank lines). Its imports are exactly what those three need:Generator,sha512,Path,Any,yaml.load,YAMLError, andBlueprintLoader,File,YAMLTagfromcommon.authentik/blueprints/v1/tasks.py: the three definitions removed (-59),from authentik.blueprints.v1.hash import blueprint_hashadded, and thesha512/Generator/Any/File/YAMLTagimports that only the moved code used dropped. Thecommonimport line goes back to the single-line form it has onmain. The two call sites (blueprints_findattasks.py:140,apply_blueprintattasks.py:201) are unchanged.authentik/blueprints/tests/test_v1_tasks.pydrivesblueprints_findandapply_blueprintthroughauthentik.blueprints.v1.tasksand never imports the hashing functions, so the file is untouched. Nothing else in the tree referencesblueprint_hash,iter_file_tagsorMISSING_FILE_MARKER(grep -rnoverauthentik/andwebsite/).Against
main(1495c1d2a) the PR diff is now:hash.py +60,tasks.py +3 -2,test_v1_tasks.py +214(the tests already approved upstream).Behaviour is identical. The hashing function from the submitted head's
tasks.pyand the one imported from the round'shash.pywere run over nine blueprints covering every branch (plain, invalid YAML, readable!File, missing!File,!Filenested in!Format, mapping-node!File, NUL in the path, missing-then-readable sequence, YAML alias) with/agent-output/oss/authentik/probe-move-equivalence.py:The repro that mirrors the committed tests, against the round head (the same script that gave 3 failed / 5 passed on
mainwhen the candidate was opened):Lint at the pinned versions (
pyproject.toml:black==26.5.1,ruff==0.16.10):The Django test file (
manage.py test authentik.blueprints.tests.test_v1_tasks) needs postgres, which this container does not have; the ticket records the hunter-rework CI workflow run 37636608849 green at the submitted head, and the fork'sCI - Mainwill run on this branch. The harness-based runs above execute the realcommon.pytag classes and the realhash.py.Reply
Moved to
authentik/blueprints/v1/hash.pyin 07efd06:iter_file_tags,MISSING_FILE_MARKERandblueprint_hashare there unchanged, andtasks.pyimportsblueprint_hashfrom it for the two call sites inblueprints_findandapply_blueprint. The tests intest_v1_tasks.pygo throughblueprints_findandapply_blueprint, so they did not need to change.