Skip to content

fix(release-verify): check podling source disclaimers when explicitly enabled - #2114

Open
liwenjie200543 wants to merge 3 commits into
apache:mainfrom
liwenjie200543:fix/podling-disclaimer-1172
Open

liwenjie200543 wants to merge 3 commits into
apache:mainfrom
liwenjie200543:fix/podling-disclaimer-1172

Conversation

@liwenjie200543

@liwenjie200543 liwenjie200543 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in source-root disclaimer check for ASF podlings. release-verify notice-license --podling and all --podling report FAIL when neither DISCLAIMER nor DISCLAIMER-WIP is a file at the source artefact root. Existing NOTICE/LICENSE checks and default output stay unchanged.

The stage is read, not inferred: release-management-config.md gains an optional, ASF-only project_stage key (incubating / top-level), which release-config load carries into config and verify-rc reads. verify-rc args adds --podling by itself for incubating, and verify-rc jvm (Step 6b) uses the same value, so a podling RC that lacks its disclaimer no longer passes Step 5 while silently dropping Step 6b's POM-disclaimer check. The DISCLAIMER / DISCLAIMER-WIP file at the source root stays only as the fallback for a config that has not recorded the stage, and args warns when an ASF project leaves the key unset rather than dropping the check quietly. --podling remains an explicit override.

Wire the flag through release-management verify-rc args, document the stage-based opt-in in verify-rc and jvm-artefacts.md, and add CLI, aggregate-verdict and skill-eval fixtures.

Partial implementation of #1172 only. This does not add IPMC voting, incubator distribution paths, version-suffix checks, or validate disclaimer wording/legal compliance. It checks the separate-file convention requested by the issue, not whether an IPMC has approved a release.

Review round 1 (blocking + major findings)

  • Blocking — nowhere to read the stage from: resolved by the project_stage config key described above (VerifyRc.project_stage normalises it and validates it against the organization's project_stage_vocab), with the "ask the RM once, then record it" path written into the skill for an unset key.
  • Major — two signals for "podling" in one run: resolved. verify-rc jvm takes the recorded stage first and falls back to the source-root file only when the key is unset.
  • Draft: lifted after the author's own diff review, recorded under AI disclosure below.

Review round 2

A second review used Codex to check backward compatibility, boundary conditions and failure propagation on 095617e3, finding no further actionable defects there. Two of its evidence points are re-checked on the current head by tests that assert them directly: --podling reaching only notice-license and all (test_podling_flag_only_on_source_disclaimer_commands), and the aggregate FAIL with a missing disclaimer (release-verify, untouched here). One stated invariant does change on purpose and is called out rather than silently dropped: verify-rc args now also reports project_stage and podling, so the default JSON is no longer byte-identical to the parent commit, though every command it emits is.

Rebase onto main (head 04d3c366)

Rebased onto main@f35629d4. The whole conflict was this skill's own measured_tokens: stamp: main re-stamped verify-rc/SKILL.md to 6881 for #2162 after this branch had stamped it, so the two sides disagreed on one frontmatter line while every hunk of prose auto-merged. The stamp was re-measured against the merged file rather than taken from either side — 7038 after the first commit, 7140 at the head — so it accounts for #2162's text and this change together, which is what the measure job checks.

git range-diff over the two ranges: the middle commit is byte-identical, and the first and third differ only in that stamp line. #2162's sandbox-golden-rule block and #2157's link fixes in the two eval READMEs are preserved; surface_hash is unchanged because no heading or requires_config: entry moved.

Verification

  • release-management: 740 passed, 2 failed. Both failures reproduce at 095617e3 on this Windows checkout and touch no changed code: test_shell asserts POSIX shell quoting, and test_integration's swhid_dir_note compares a git archive tree with this checkout's symlink-materialised working tree.
  • release-config: 219 passed, 7 failed. All seven are Windows path-separator assertions (a backslash where the test expects /), including the four layer-resolution tests and the three vote-tally roster-path tests.
  • release-verify: 100 passed, 1 skipped, 17 failed. All seventeen are GPG- or symlink-dependent cases (no usable gpg keyring, symlink creation denied in this sandbox); none touches a line this PR changes.
  • New tests: project_stage normalisation and validation; args emitting --podling only for incubating and only on notice-license / all; the unset-key warning and its absence for a non-ASF adopter; --podling staying an override; Step 6b taking the configured stage over the tree, in both directions; the template's project_stage parsing to unset; load carrying the key into config.
  • End-to-end against a throwaway adopter config: project_stage: incubating → args emits --podling with no warning; unset → warning, no flag; top-level → no flag, no warning; an invalid value → exit 2 naming both allowed stages; jvm with incubating and no DISCLAIMER anywhere in the tree → recipe carries --podling.
  • Ruff check and format check: pass. Mypy: pass for release-management (50 source files).
  • measured_tokens re-measured for verify-rc/SKILL.md (7140 on the rebased head; 6832 before the rebase); surface_hash unchanged (no heading or requires_config movement).
  • Generated plugin mirrors synced (plugins/magpie-security-tools/tools/release-management, plugins/magpie-setup/templates/release-management-config.md).
  • Model evals: not run. The Step 5 eval case's premise now says the flag came from the config; no model-eval pass is claimed.
  • CI on the current head: 15 checks passed, 1 skipped.
  • prek: passes in CI on the rebased head; it was not run in the local environment this was written in.

AI disclosure

Implementation, test preparation and this description were AI-generated, per the ASF generative-tooling guidance. I have read the full diff myself and I own it: the project_stage read and validation path (common.py:86-107), the flag placement and warning in args.py:88-89,121-126,136-145, the Step 6b stage precedence (jvm.py:225-241), the CLI default (cli.py:78-83), the adopter template and Magpie's own config, and the new tests. Nothing in this change reaches review without a human having gone through it.

@github-actions github-actions Bot added family:tools tools/* family:docs Docs, MISSION.md, READMEs capability:triage Sweep + classify + propose disposition family:release-management release-* skills substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison) labels Nov 15, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for picking up part of #1172. The check itself is right, and I ran the Step 5 eval suite on this head: all three cases pass, the new podling case included.

Blocking — the skill has nowhere to read the stage from (plugins/magpie-release-management/skills/verify-rc/SKILL.md:245)

For an ASF project whose resolved <project-stage> is incubating, add --podling

<project-stage> resolves only to the organization's vocabulary, project_stage_vocab: [incubating, top-level] in organizations/ASF/organization.md; no config key records which stage this project is in. So the agent has nothing to read, and the PR rightly forbids inferring it from the file. Either:

  • add a project_stage key (in release-management-config.md, where the release skills already read their config) that verify-rc load / args reads, so --podling is set by code, not by the model; or
  • until that key exists, have the skill ask the release manager once whether the project is incubating, as committer-onboarding does (the precedent #1172 cites).

Major — two signals for "podling" in one run (tools/release-management/src/release_management/verify_rc/jvm.py:65)

The JVM recipe still decides podling from a DISCLAIMER / DISCLAIMER-WIP file at the source root. For a podling RC that lacks the file, Step 5 now fails, but Step 6b silently drops the POM-disclaimer check. Pass the same explicit stage to the JVM recipe when it is known, and keep the file only as the fallback.

Before this can be approved

The description says human review and ownership of the diff "have not been represented as completed" and asks not to mark it ready for review. Please review the change yourself and confirm in the description that you have, per the ASF's generative-tooling guidance; until then, keep the PR in draft.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. After you've
addressed the points above and pushed an update, an Apache Magpie
maintainer — a real person — will take the next look
at the PR. The findings cite the project's review criteria;
if you think one of them is mis-applied, please reply on the
PR and a maintainer will weigh in.

More on how Apache Magpie handles maintainer review:
Contributing guide.

@MakerFlyFly MakerFlyFly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this focused, opt-in check and covering both disclaimer filenames. This is a useful step toward podling release verification.

Building on the earlier review, I used Codex to check backward compatibility, boundary conditions, and failure propagation on 095617e3:

  • 13 focused pytest cases passed.
  • 84 input combinations confirmed that default JSON output matches the parent commit. With --podling, directories, nested disclaimers, and files present only in the previous release do not satisfy the check. Existing NOTICE/LICENSE FAIL and REVIEW results remain intact when a disclaimer is present.
  • Eight command-generation scenarios confirmed that the flag reaches only notice-license and all, and that the generated commands parse successfully.
  • Aggregate failure propagation was verified: a missing disclaimer produces an overall FAIL, even with --status notice-license=PASS. GPG verification was mocked for this focused check.

I found no additional actionable defects in these paths. This adds regression evidence for the mechanical implementation; the outstanding findings from the earlier review still need to be resolved.

This content has been optimized by AI for better expression.

liwenjie200543 added a commit to liwenjie200543/magpie that referenced this pull request Nov 17, 2026
…file

Review of apache#2114 found two signals for "podling" in one run: `args` took the
flag from the caller, and the JVM recipe decided it from a DISCLAIMER file
at the source root. For a podling RC that lacks that file — the defect
Step 5 exists to catch — Step 6b silently dropped its POM-disclaimer check.

Read `project_stage` from the loaded config instead: `VerifyRc.project_stage`
normalises and validates it, `args` adds `--podling` itself, and `jvm` uses
the same value, keeping the source-root file only as the fallback for a
config that has not recorded one. `args` now states the stage and the
resolved podling flag, and warns when an ASF project leaves the key unset,
so the check cannot disappear without a word.

`--podling` on `verify-rc args` survives as an explicit override. The skill
text and `jvm-artefacts.md` now say where the value is read from and what
to do (ask the RM once, then record it) when it is unset.

Refs apache#1172
@liwenjie200543

Copy link
Copy Markdown
Contributor Author

Thanks — both findings were right, and I took the config-key route for the blocking one.

release-management-config.md now carries an optional, ASF-only project_stage (incubating / top-level), which release-config load passes through in config; VerifyRc.project_stage normalises and validates it against the organization's project_stage_vocab, and verify-rc args adds --podling itself, so nothing is inferred from a file. When the key is unset on an ASF project, args warns and the skill tells the RM to answer once and record it, rather than the check disappearing.

For the second finding, verify-rc jvm now takes the recorded stage first and keeps DISCLAIMER / DISCLAIMER-WIP only as the fallback when the key is unset. I checked the case you described end to end: project_stage: incubating with a source tree that has no disclaimer now produces a --podling recipe in Step 6b instead of dropping the POM check.

On the draft: it stays in draft, and the description says so. I will leave the human-review confirmation to the PR owner rather than assert it here.

@liwenjie200543
liwenjie200543 marked this pull request as draft November 17, 2026 13:19
@github-actions github-actions Bot added the family:setup setup-* skills label Nov 17, 2026
@liwenjie200543
liwenjie200543 marked this pull request as ready for review November 17, 2026 13:41
@liwenjie200543
liwenjie200543 force-pushed the fix/podling-disclaimer-1172 branch from 7b4af2a to 04d3c36 Compare November 19, 2026 03:20
liwenjie200543 added a commit to liwenjie200543/magpie that referenced this pull request Nov 19, 2026
…file

Review of apache#2114 found two signals for "podling" in one run: `args` took the
flag from the caller, and the JVM recipe decided it from a DISCLAIMER file
at the source root. For a podling RC that lacks that file — the defect
Step 5 exists to catch — Step 6b silently dropped its POM-disclaimer check.

Read `project_stage` from the loaded config instead: `VerifyRc.project_stage`
normalises and validates it, `args` adds `--podling` itself, and `jvm` uses
the same value, keeping the source-root file only as the fallback for a
config that has not recorded one. `args` now states the stage and the
resolved podling flag, and warns when an ASF project leaves the key unset,
so the check cannot disappear without a word.

`--podling` on `verify-rc args` survives as an explicit override. The skill
text and `jvm-artefacts.md` now say where the value is read from and what
to do (ask the RM once, then record it) when it is unset.

Refs apache#1172
@liwenjie200543

Copy link
Copy Markdown
Contributor Author

Rebased onto main@f35629d4, so the PR is mergeable again. The only conflict was this skill's own measured_tokens: line: main re-stamped verify-rc/SKILL.md to 6881 with #2162 after this branch had re-stamped it, so all the prose auto-merged and that one frontmatter line did not. I re-measured the merged file rather than picking a side — 7038 on the first commit, 7140 at the head — so the stamp covers #2162's text and this change together.

git range-diff over the two ranges: the middle commit is byte-identical and the first and third differ only in that line. #2162's sandbox-golden-rule block and #2157's link fixes in the two eval READMEs are intact, and surface_hash is unchanged because no heading or requires_config: entry moved.

CI is green on 04d3c366 (15 checks passed, CodeQL skipped), including measure, prek and the full pytest matrix. The PR is out of draft rather than back in it: the description now carries the human diff review @potiuk asked for, and the rebase section there records what moved. Say the word if you would rather it went back to draft while you look.

… enabled

Add opt-in disclaimer presence checks and sync generated mirrors.
Partial implementation of apache#1172.

Generated-by: OpenAI Codex
The organization manifest publishes only the lifecycle vocabulary
(`project_stage_vocab: [incubating, top-level]`); nothing recorded which
value applies to a given project, so the podling checks had no value to
read and the skill was left inferring one from a release artefact.

Add the optional, ASF-only `project_stage` key to the adopter template and
to Magpie's own config (`top-level`), documenting that it is the only place
the stage can come from and that `verify-rc args` adds `--podling` itself.

Refs apache#1172
…file

Review of apache#2114 found two signals for "podling" in one run: `args` took the
flag from the caller, and the JVM recipe decided it from a DISCLAIMER file
at the source root. For a podling RC that lacks that file — the defect
Step 5 exists to catch — Step 6b silently dropped its POM-disclaimer check.

Read `project_stage` from the loaded config instead: `VerifyRc.project_stage`
normalises and validates it, `args` adds `--podling` itself, and `jvm` uses
the same value, keeping the source-root file only as the fallback for a
config that has not recorded one. `args` now states the stage and the
resolved podling flag, and warns when an ASF project leaves the key unset,
so the check cannot disappear without a word.

`--podling` on `verify-rc args` survives as an explicit override. The skill
text and `jvm-artefacts.md` now say where the value is read from and what
to do (ask the RM once, then record it) when it is unset.

Refs apache#1172
@liwenjie200543
liwenjie200543 force-pushed the fix/podling-disclaimer-1172 branch from 04d3c36 to 0d90fc4 Compare November 22, 2026 13:02
@liwenjie200543

Copy link
Copy Markdown
Contributor Author

Rebased onto main@0f983ee2, so the PR is mergeable again. The only conflicts were the measured_tokens: stamp in verify-rc/SKILL.md; I re-measured it from the final merged file instead of picking a side, so it now reads 7210.

@potiuk both findings from your review are addressed: the blocking one took the config-key route (project_stage recorded in release-management-config.md), and the thread is resolved and outdated. Could you take another look when you have a moment?

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:triage Sweep + classify + propose disposition family:docs Docs, MISSION.md, READMEs family:release-management release-* skills family:setup setup-* skills family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants