Skip to content

simplify: remove disk re-reads, fix dead param, return set from load_combined#3

Merged
jordankrueger merged 1 commit intomainfrom
simplify/cleanup
Apr 28, 2026
Merged

simplify: remove disk re-reads, fix dead param, return set from load_combined#3
jordankrueger merged 1 commit intomainfrom
simplify/cleanup

Conversation

@jordankrueger
Copy link
Copy Markdown
Owner

Summary

  • build.py — allowlist self-test now checks in-memory domain sets instead of re-reading all four output files from disk. Same safety guarantee, avoids 4× 66k-domain parse round-trip that was redundant (we already have those sets in memory right after writing them).
  • import_to_actionkit.py — removed dead base_url parameter from fetch_existing() (it was never referenced inside the function; the URL was always built from instance directly). Inlined the base URL at the one POST call site.
  • import_to_actionkit.pyload_combined() now returns set[str] directly, eliminating the redundant set(domains) wrap in main().
  • import_to_actionkit.py — converted stray .format() call to f-string for consistency with the rest of the file.

Test plan

  • Smoke test passed: normalize() works, load_combined() returns a set of 66,169 domains with gmail.com absent
  • Full python3 scripts/build.py --no-fetch run (CI / manual)
  • AI code review (auto-triggered)

🤖 Generated with Claude Code

…et from load_combined

- build.py: allowlist self-test now checks in-memory sets instead of
  re-reading all four output files from disk (same guarantee, no 4×
  66k-file parse round-trip)
- import_to_actionkit.py: drop dead `base_url` param from fetch_existing
  (it was never used — URL was built from `instance` directly); inline
  the base URL at the one POST call site
- import_to_actionkit.py: load_combined() now returns set[str] directly,
  eliminating the redundant set() wrap in main()
- import_to_actionkit.py: convert stray .format() to f-string for consistency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review (gpt-5.1-codex-mini)

🟡 IMPORTANT scripts/import_to_actionkit.py:74fetch_existing now drops the base_url parameter while the body still uses base_url to build GET calls; the name is undefined and the import script will raise a NameError before making any requests, so existing domains can’t be read or compared.


Summary: Removing base_url from fetch_existing broke the function: it now references an undefined name and will crash before syncing with ActionKit, so the import script cannot run.
Result: FAIL — blocking findings detected

1 finding(s) at or above 'important' threshold block this PR.

@jordankrueger jordankrueger merged commit f3da5e5 into main Apr 28, 2026
2 of 3 checks passed
@jordankrueger jordankrueger deleted the simplify/cleanup branch April 28, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant