Repository navigation
docs(spec-changes): correct the 0.3.0.dev0 history and fix the change audit #711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| """ | ||
|
|
||
| import argparse | ||
| from datetime import date | ||
| from pathlib import Path | ||
| import re | ||
| import subprocess | ||
|
|
@@ -33,7 +34,7 @@ | |
|
|
||
|
|
||
| def candidate_prs(git_log: str) -> dict[str, str]: | ||
| """Map PR number to commit subject for eligible mainline commits.""" | ||
| """Map PR number to commit subject for eligible commits.""" | ||
| candidates = {} | ||
| for subject in git_log.splitlines(): | ||
| match = PR_IN_LOG.search(subject) | ||
|
|
@@ -48,14 +49,21 @@ def recorded_prs(history: str) -> set[str]: | |
|
|
||
| def main() -> int: | ||
| parser = argparse.ArgumentParser(description=__doc__) | ||
| parser.add_argument("--since", default="2026-09-01", help="Earliest merge date, YYYY-MM-DD") | ||
| parser.add_argument("--history", type=Path, default=Path("docs/spec_changes.md")) | ||
| parser.add_argument("--since", type=date.fromisoformat, default=date(2026, 9, 1), | ||
| help="Earliest merge date in UTC, YYYY-MM-DD") | ||
| parser.add_argument("--history", type=Path, | ||
| help="History file, default docs/spec_changes.md at the repository root") | ||
| parser.add_argument("--git-ref", default="HEAD", help="Git ref to inspect, default HEAD") | ||
| args = parser.parse_args() | ||
| try: | ||
| history = args.history.read_text(encoding="utf-8") | ||
| # Resolve paths from the repository root so the audit works from any subdirectory. | ||
| root = Path(subprocess.run( | ||
| ["git", "rev-parse", "--show-toplevel"], | ||
| check=True, text=True, capture_output=True, | ||
| ).stdout.strip()) | ||
| history = (args.history or root / "docs/spec_changes.md").read_text(encoding="utf-8") | ||
| result = subprocess.run( | ||
| ["git", "log", "--first-parent", f"--since={args.since}", | ||
| ["git", "-C", str(root), "log", f"--since={args.since} 00:00:00 +0000", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without --first-parent, the path-filtered git log skips a real Merge pull request #N merge commit: The documented 2026-09-01 window has only squash merges, but with --since 2025-01-01 the script on main finds nine older merges (such as #54 and #65) that this one misses. Could we add --show-pulls here, which brings them back and still passes the new tests?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @christianeu-db for identifying the ordinary-merge coverage gap. I independently reproduced it against the current #711 HEAD ( The original implementation missed merge PRs in eight targeted cases. Applying Evidence: This verifies a temporary Fork candidate. The fix has not been pushed into #711. Apache upstream CI has passed its existing tests, but those tests do not cover these ordinary-merge cases. Would you prefer incorporating I have left the thread open for maintainer review. |
||
| "--format=%s", args.git_ref, "--", "core-spec", "ontology"], | ||
| check=True, text=True, capture_output=True, | ||
| ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#574 and #582 tighten the schema the same way #668 does: primary_key: [] and an object mapping with neither expression nor referent_mappings used to validate and now fail. Should they get rows next to this one, or is leaving them out intended?