Skip to content

fix: skip artifact writes when hosts are unchanged - #320

Open
xsfX20 wants to merge 1 commit into
521xueweihan:mainfrom
xsfX20:codex/github520-noop-guard-20260813
Open

fix: skip artifact writes when hosts are unchanged#320
xsfX20 wants to merge 1 commit into
521xueweihan:mainfrom
xsfX20:codex/github520-noop-guard-20260813

Conversation

@xsfX20

@xsfX20 xsfX20 commented Aug 13, 2026

Copy link
Copy Markdown

What does this PR do?

Avoid rewriting the generated hosts artifact before the no-op comparison, so the scheduled workflow does not create commits when the published hosts content is unchanged. Add regression tests for unchanged and changed artifact behavior.

Why?

The repository TODO promises that unchanged hosts content will not update the generated files. The current write order rewrites hosts before comparing README content, while the workflow stages all files. This patch compares first and writes generated artifacts only after a real content change.

Tests

  • PYTHONPATH=/tmp/github520-test-deps:$PWD python3 -m unittest discover -s tests -p 'test_*.py' -v
  • python3 -m py_compile common.py update_ips.py fetch_ips.py
  • git diff --check

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