Skip to content

ci: fail a PR that stages a 6.0 change without updating the upgrade guide (07lk.14) - #1388

Merged
dgunning merged 1 commit into
mainfrom
ci/07lk14-upgrade-guide-gate
Sep 30, 2026
Merged

dgunning merged 1 commit into
mainfrom
ci/07lk14-upgrade-guide-gate

Conversation

@dgunning

Copy link
Copy Markdown
Owner

What this changes

A PR whose added lines in edgar/ stage a 6.0 change now fails test-fast (3.13) unless it also touches docs/upgrade/6.0.md. Staging means warn_will_raise(...), any *deprecat*(...) helper, warn_legacy_html_usage(...), DeprecationWarning / FutureWarning, "removed/deprecated in [edgartools] [v]6.0", or a new *.deprecated.md / *.removed.md changelog fragment.

Why: #1200/#1201 shipped the edgar.files deprecations in 5.55.0 with no guide entry, and nothing mechanical noticed. This is the 6.0 process gate decided on 2026-09-30 (bead edgartools-07lk.14), and it has to be in place before 5.60.0, the last 5.x release.

  • Comments and def lines are ignored.
  • Markers are netted across the PR, so moving or restructuring an existing warning, or deleting one during the 6.0 window, passes.
  • The no-upgrade-guide label (created) skips the check visibly. Labels are read live, so re-run the job after adding it.
  • The diff comes from the pull-request files API, because the checkout is shallow. A file whose patch the API omits is reported, not passed.

Also adds .github/pull_request_template.md: the Definition of Done checklist, the 6.0 guide item, and an optional working-context section for AI-assisted PRs.

Verification

Replayed against history. I ran it over the 265 commits merged to main since the guide was created (2026-08-05):

Result Count PRs
staged a change and updated the guide (pass) 10 #1024, #1075, #1198, #1332, #1379, …
real miss (fail) 4 #1034, #1201, 2464a53 (effect/form144 moves), 4e31aed (FilingHomepage(soup=) deprecation)
label case (fail) 1 #1384: a new warning site for a change #1379 had just documented

Netting is what clears #1037, which only restructured an existing warn_will_raise call.

Found along the way: the 4e31aed deprecations (FilingHomepage(soup=...) and passing a BeautifulSoup to the homepage parser, both "removed in v6.0") are still absent from docs/upgrade/6.0.md. I'll fix that in a follow-up.

Tests: tests/meta/test_upgrade_guide_gate.py has 20 fast tests, including the #1201 patch verbatim. Mutation-probed: disabling netting, the helper list, or the comment/def filter each fails tests (1, 3 and 3). tests/meta has 92 passing.

This PR stages nothing, so its own run exercises the pass path.

🤖 Generated with Claude Code

…uide (07lk.14)

#1200/#1201 shipped the edgar.files deprecations in 5.55.0 with no
docs/upgrade/6.0.md entry, and nothing mechanical noticed. A CHANGELOG entry
gets written by habit; an upgrade-guide entry does not.

scripts/check_upgrade_guide.py reads the PR's added lines in edgar/ (from the
pull-request files API, since the checkout is shallow) and fails when they
stage a 6.0 change -- warn_will_raise(), a *deprecat*( helper,
warn_legacy_html_usage(), DeprecationWarning/FutureWarning, "removed/deprecated
in [edgartools] [v]6.0", or a new deprecated/removed changelog fragment --
without the PR also touching docs/upgrade/6.0.md. Comments and defs are
ignored, and staging markers are netted across the PR, so moving or
restructuring an existing warning, or deleting one in the 6.0 window, passes.
The `no-upgrade-guide` label skips it visibly.

Replayed over the 265 commits merged since the guide was created: 10 staged
and updated the guide (pass); 5 fail. Four are real misses -- #1034, #1201,
2464a53 (effect/form144 moves), 4e31aed (FilingHomepage soup deprecation,
still absent from the guide). The fifth, #1384, added a warning site for a
change #1379 had just documented, the label's case. Netting is what cleared
#1037. The first two trigger rules (generic helper name, "v6.0" spelling) were
widened after the replay showed #1201 and 4e31aed slipping through.

Runs as a step in test-fast, the required context, like the other source
gates. Adds .github/pull_request_template.md: the Definition of Done
checklist, the 6.0 guide item, and an optional working-context section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning enabled auto-merge (squash) September 30, 2026 20:39
@dgunning
dgunning merged commit 33bd3b8 into main Sep 30, 2026
8 checks passed
@dgunning
dgunning deleted the ci/07lk14-upgrade-guide-gate branch September 30, 2026 20:54
dgunning added a commit that referenced this pull request Oct 1, 2026
…ttpx2 out of 6.0 (#1392)

The 5.60.0 guide pass (bead edgartools-07lk.10, 2026-09-30 decisions).

- New section: FilingHomepage(soup=...) and a BeautifulSoup passed as `root`
  to FilingHomepage / Attachments.load have warned "removed in v6.0" since
  5.53.0 (4e31aed) with no guide entry. The replay of the new upgrade-guide
  gate (#1388) found it. Both warnings and the warning-free
  parse_homepage_html form verified by running them.
- Errors section: filing.html() keeps returning None in 6.0 when there is no
  HTML primary document. #1338 (5.59.0) made the no-primary-document case
  return None instead of raising AttributeError; the guide now says that is
  the decided 6.0 behaviour rather than leaving it to omission.
- Still to come: httpx -> httpx2 is out of 6.0 (decided 2026-09-30), not
  "under consideration".
- The top-of-page note claimed only two changes rename or move anything;
  settings, date helpers, access modes and FilingHomepage(soup=) made it
  false. Rewritten as loud (warns, then breaks) vs quiet (different values).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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