Repository navigation
build(release): autoPublish 改回 true - #48
Conversation
- 0.1.0/0.2.0 已验证人工 Publish 链路,无需每版人工闸 - 同步 pom 注释、release.yml 步骤名、CONTRIBUTING §8、release-guide §2.1/§5
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
审阅者指南配置在 Portal 验证通过后启用 Maven Central 自动发布,并更新发布工作流步骤的说明,以体现发布操作不可撤销。
文档更新贡献指南和发布指南,说明从 0.3.0 版本开始自动发布,并将发布风险检查移至推送标签之前。
提示与命令与 Sourcery 交互
自定义使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's GuideConfigurationEnable automatic Maven Central publication after Portal validation and update the release workflow step description to reflect the irreversible publish behavior.
DocumentationUpdate contributor and release guidance to document automatic publishing from 0.3.0 onward and move the release-risk check to before pushing a tag.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
嗨——我发现了 5 个问题
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Unapproved artifacts publish publicly**
When a matching `v*` tag points to an unintended or malicious commit that passes `mvn verify`, the release workflow checks only the tag-to-POM version and `mvn verify`, then `autoPublish=true` publishes the tagged artifacts without a human approval checkpoint, so unapproved or malicious artifacts become public.
Require explicit human approval before publishing tagged release artifacts instead of auto-publishing them.
</issue_to_address>
### Comment 2
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Local deploy bypasses release gate**
When a maintainer runs the release-profile deploy command locally with Central credentials configured, a developer running `mvn -P release deploy` outside GitHub Actions activates this same release profile and automatically publishes the current checkout, without the workflow’s tag/version check; a local or untagged build can therefore consume a permanent Central version before the reviewed release.
Make automatic publishing opt-in via a property set only by the guarded release workflow, or otherwise enforce the workflow’s release checks for every invocation.
</issue_to_address>
### Comment 3
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Retagged release publishes stale artifacts**
When a version tag is deleted and repushed to a different commit while the original release job is still running, the original job can publish its checked-out commit through `autoPublish=true`, permanently occupying the version; the newer run is then rejected and the older artifacts remain public.
Cancel in-flight release jobs when a tag is retargeted and gate upload on the tag still pointing to the job’s checked-out commit.
Also at `docs/release-guide.md:78-79`.
</issue_to_address>
### Comment 4
<location path="docs/release-guide.md" line_range="77-78" />
<code_context>
-> **不可撤回提醒**:Central 发布后坐标永久公开、不可删除。发布前发现的任何问题,
-> 直接在 Portal 丢弃(Discard)该部署,修完重新打 tag(删除 tag 重推即可,workflow 幂等)。
+> **不可撤回提醒**:Central 发布后坐标永久公开、不可删除。上传前发现的任何问题,
+> 直接丢弃(Discard)该部署,修完重新打 tag(删除 tag 重推即可,workflow 幂等)。
## 3. 阶段三:发版后验证
</code_context>
<issue_to_address>
**Discard guidance cannot stop release**
When an operator finds a release issue before upload and follows the discard instruction, the guide directs operators to discard a deployment that does not yet exist; after upload, `autoPublish=true` publishes it as soon as validation passes, leaving no discard window to stop an erroneous release.
Replace the discard-and-retag recovery instruction with guidance that reflects there is no deployment to discard before upload and no discard window after automatic publication.
</issue_to_address>
### Comment 5
<location path="docs/wop-sdk-report-java.md" line_range="219" />
<code_context>
| 测试/覆盖率 | 208 tests 全绿;聚合行/分支 100.00% |
-**已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。
+**已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。(0.3.0 起改回 `true`,见 CONTRIBUTING §8)
**发版前唯一阻断项**:Central Portal namespace `com.wanlianyida` 的 DNS TXT 验证(需 wanlianyida.com 域名控制权,操作指引见会话回复)。
</code_context>
<issue_to_address>
**Release instructions contradict each other**
When a maintainer consults the report to understand the current release process, `docs/wop-sdk-report-java.md` says releases require manual Publish and refers to `autoPublish=false`, while the release guide says Portal validation publishes automatically, so readers get conflicting instructions.
Update the report’s release-policy description and reference to match the current automatic-publishing process.
Also at `docs/release-guide.md:70`.
</issue_to_address>Sourcery 评估
需要人工审核。 有 4 项发现需要先处理;并且启用 autoPublish=true 后,通过 Portal 验证的带标签版本会在没有人工审核环节的情况下永久公开。回滚可以为未来的版本恢复人工把关,但无法撤回已经发布的制品;自动发布策略本身才是影响重大的决策。
阻塞性发现:pom.xml:222、pom.xml:222、pom.xml:222、docs/release-guide.md:78
Original comment in English
Hey - I've found 5 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Unapproved artifacts publish publicly**
When a matching `v*` tag points to an unintended or malicious commit that passes `mvn verify`, the release workflow checks only the tag-to-POM version and `mvn verify`, then `autoPublish=true` publishes the tagged artifacts without a human approval checkpoint, so unapproved or malicious artifacts become public.
Require explicit human approval before publishing tagged release artifacts instead of auto-publishing them.
</issue_to_address>
### Comment 2
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Local deploy bypasses release gate**
When a maintainer runs the release-profile deploy command locally with Central credentials configured, a developer running `mvn -P release deploy` outside GitHub Actions activates this same release profile and automatically publishes the current checkout, without the workflow’s tag/version check; a local or untagged build can therefore consume a permanent Central version before the reviewed release.
Make automatic publishing opt-in via a property set only by the guarded release workflow, or otherwise enforce the workflow’s release checks for every invocation.
</issue_to_address>
### Comment 3
<location path="pom.xml" line_range="222" />
<code_context>
- <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish -->
- <autoPublish>false</autoPublish>
+ <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) -->
+ <autoPublish>true</autoPublish>
</configuration>
</plugin>
</code_context>
<issue_to_address>
**Retagged release publishes stale artifacts**
When a version tag is deleted and repushed to a different commit while the original release job is still running, the original job can publish its checked-out commit through `autoPublish=true`, permanently occupying the version; the newer run is then rejected and the older artifacts remain public.
Cancel in-flight release jobs when a tag is retargeted and gate upload on the tag still pointing to the job’s checked-out commit.
Also at `docs/release-guide.md:78-79`.
</issue_to_address>
### Comment 4
<location path="docs/release-guide.md" line_range="77-78" />
<code_context>
-> **不可撤回提醒**:Central 发布后坐标永久公开、不可删除。发布前发现的任何问题,
-> 直接在 Portal 丢弃(Discard)该部署,修完重新打 tag(删除 tag 重推即可,workflow 幂等)。
+> **不可撤回提醒**:Central 发布后坐标永久公开、不可删除。上传前发现的任何问题,
+> 直接丢弃(Discard)该部署,修完重新打 tag(删除 tag 重推即可,workflow 幂等)。
## 3. 阶段三:发版后验证
</code_context>
<issue_to_address>
**Discard guidance cannot stop release**
When an operator finds a release issue before upload and follows the discard instruction, the guide directs operators to discard a deployment that does not yet exist; after upload, `autoPublish=true` publishes it as soon as validation passes, leaving no discard window to stop an erroneous release.
Replace the discard-and-retag recovery instruction with guidance that reflects there is no deployment to discard before upload and no discard window after automatic publication.
</issue_to_address>
### Comment 5
<location path="docs/wop-sdk-report-java.md" line_range="219" />
<code_context>
| 测试/覆盖率 | 208 tests 全绿;聚合行/分支 100.00% |
-**已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。
+**已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。(0.3.0 起改回 `true`,见 CONTRIBUTING §8)
**发版前唯一阻断项**:Central Portal namespace `com.wanlianyida` 的 DNS TXT 验证(需 wanlianyida.com 域名控制权,操作指引见会话回复)。
</code_context>
<issue_to_address>
**Release instructions contradict each other**
When a maintainer consults the report to understand the current release process, `docs/wop-sdk-report-java.md` says releases require manual Publish and refers to `autoPublish=false`, while the release guide says Portal validation publishes automatically, so readers get conflicting instructions.
Update the report’s release-policy description and reference to match the current automatic-publishing process.
Also at `docs/release-guide.md:70`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 4 findings to address first, and with autoPublish=true, a tagged release that passes Portal validation becomes permanently public without a human review step. Reverting can restore the manual gate for future releases, but cannot withdraw artifacts already published; the automatic-publication policy itself is the consequential decision.
Blocking findings: pom.xml:222, pom.xml:222, pom.xml:222, docs/release-guide.md:78
| <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish --> | ||
| <autoPublish>false</autoPublish> | ||
| <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) --> | ||
| <autoPublish>true</autoPublish> |
There was a problem hiding this comment.
🟠 高 · 未经批准的制品会公开发布
当匹配的 v* 标签指向意外或恶意的提交,且该提交通过 mvn verify 时,发布工作流只检查标签与 POM 版本是否匹配以及 mvn verify 是否通过,随后 autoPublish=true 就会在没有人工审批环节的情况下发布带标签的制品,因此未经批准或恶意的制品会公开发布。
应在发布带标签的版本制品前要求明确的人工审批,而不是自动发布。
提供给 AI 智能体的提示
在 `pom.xml` 第 222 行:
**未经批准的制品会公开发布**
当匹配的 `v*` 标签指向意外或恶意的提交,且该提交通过 `mvn verify` 时,发布工作流只检查标签与 POM 版本是否匹配以及 `mvn verify` 是否通过,随后 `autoPublish=true` 就会在没有人工审批环节的情况下发布带标签的制品,因此未经批准或恶意的制品会公开发布。
应在发布带标签的版本制品前要求明确的人工审批,而不是自动发布。Original comment in English
🟠 High · Unapproved artifacts publish publicly
When a matching v* tag points to an unintended or malicious commit that passes mvn verify, the release workflow checks only the tag-to-POM version and mvn verify, then autoPublish=true publishes the tagged artifacts without a human approval checkpoint, so unapproved or malicious artifacts become public.
Require explicit human approval before publishing tagged release artifacts instead of auto-publishing them.
Prompt for AI agents
In `pom.xml` at line 222:
**Unapproved artifacts publish publicly**
When a matching `v*` tag points to an unintended or malicious commit that passes `mvn verify`, the release workflow checks only the tag-to-POM version and `mvn verify`, then `autoPublish=true` publishes the tagged artifacts without a human approval checkpoint, so unapproved or malicious artifacts become public.
Require explicit human approval before publishing tagged release artifacts instead of auto-publishing them.| <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish --> | ||
| <autoPublish>false</autoPublish> | ||
| <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) --> | ||
| <autoPublish>true</autoPublish> |
There was a problem hiding this comment.
🟡 中 · 本地部署绕过发布关卡
当维护者配置了 Central 凭据并在本地运行发布配置的部署命令时,开发者在 GitHub Actions 之外运行 mvn -P release deploy,会激活同一个发布配置并自动发布当前检出的代码,而不会执行工作流中的标签/版本检查;因此,本地构建或未打标签的构建可能会在经过审核的版本发布之前占用一个永久性的 Central 版本号。
通过仅由受保护的发布工作流设置的属性来选择启用自动发布,或者以其他方式确保每次调用都执行工作流中的发布检查。
提供给 AI 智能体的提示
在 `pom.xml` 第 222 行:
**本地部署绕过发布关卡**
当维护者配置了 Central 凭据并在本地运行发布配置的部署命令时,开发者在 GitHub Actions 之外运行 `mvn -P release deploy`,会激活同一个发布配置并自动发布当前检出的代码,而不会执行工作流中的标签/版本检查;因此,本地构建或未打标签的构建可能会在经过审核的版本发布之前占用一个永久性的 Central 版本号。
通过仅由受保护的发布工作流设置的属性来选择启用自动发布,或者以其他方式确保每次调用都执行工作流中的发布检查。Original comment in English
🟡 Medium · Local deploy bypasses release gate
When a maintainer runs the release-profile deploy command locally with Central credentials configured, a developer running mvn -P release deploy outside GitHub Actions activates this same release profile and automatically publishes the current checkout, without the workflow’s tag/version check; a local or untagged build can therefore consume a permanent Central version before the reviewed release.
Make automatic publishing opt-in via a property set only by the guarded release workflow, or otherwise enforce the workflow’s release checks for every invocation.
Prompt for AI agents
In `pom.xml` at line 222:
**Local deploy bypasses release gate**
When a maintainer runs the release-profile deploy command locally with Central credentials configured, a developer running `mvn -P release deploy` outside GitHub Actions activates this same release profile and automatically publishes the current checkout, without the workflow’s tag/version check; a local or untagged build can therefore consume a permanent Central version before the reviewed release.
Make automatic publishing opt-in via a property set only by the guarded release workflow, or otherwise enforce the workflow’s release checks for every invocation.| <!-- 首次发版策略:false = 上传后停在 Portal 待发布,人工核对后手动 Publish --> | ||
| <autoPublish>false</autoPublish> | ||
| <!-- 链路上线策略:true = Portal 校验通过后自动发布(发布不可撤销,坐标永久公开) --> | ||
| <autoPublish>true</autoPublish> |
There was a problem hiding this comment.
🟠 高 · 重新打标签会发布过时制品
当版本标签在原始发布任务仍在运行时被删除并重新指向另一个提交时,原始任务可能通过 autoPublish=true 发布其检出的提交,从而永久占用该版本号;之后,较新的运行会被拒绝,旧制品则继续公开。
当标签被重新指向时,取消正在进行的发布任务,并且只有在标签仍指向任务检出的提交时才允许上传。
另见 docs/release-guide.md:78-79。
提供给 AI 智能体的提示
在 `pom.xml` 第 222 行:
**重新打标签会发布过时制品**
当版本标签在原始发布任务仍在运行时被删除并重新指向另一个提交时,原始任务可能通过 `autoPublish=true` 发布其检出的提交,从而永久占用该版本号;之后,较新的运行会被拒绝,旧制品则继续公开。
当标签被重新指向时,取消正在进行的发布任务,并且只有在标签仍指向任务检出的提交时才允许上传。
另见 `docs/release-guide.md:78-79`。Original comment in English
🟠 High · Retagged release publishes stale artifacts
When a version tag is deleted and repushed to a different commit while the original release job is still running, the original job can publish its checked-out commit through autoPublish=true, permanently occupying the version; the newer run is then rejected and the older artifacts remain public.
Cancel in-flight release jobs when a tag is retargeted and gate upload on the tag still pointing to the job’s checked-out commit.
Also at docs/release-guide.md:78-79.
Prompt for AI agents
In `pom.xml` at line 222:
**Retagged release publishes stale artifacts**
When a version tag is deleted and repushed to a different commit while the original release job is still running, the original job can publish its checked-out commit through `autoPublish=true`, permanently occupying the version; the newer run is then rejected and the older artifacts remain public.
Cancel in-flight release jobs when a tag is retargeted and gate upload on the tag still pointing to the job’s checked-out commit.
Also at `docs/release-guide.md:78-79`.| > **不可撤回提醒**:Central 发布后坐标永久公开、不可删除。上传前发现的任何问题, | ||
| > 直接丢弃(Discard)该部署,修完重新打 tag(删除 tag 重推即可,workflow 幂等)。 |
There was a problem hiding this comment.
🟡 中 · 丢弃说明无法阻止发布
当操作人员在上传前发现版本存在问题并按照丢弃说明操作时,指南会要求他们丢弃一个尚不存在的部署;上传后,autoPublish=true 会在验证通过后立即发布,因此没有可用于阻止错误发布的丢弃时限。
请用新的指导替换“丢弃并重新打标签”的恢复说明,明确指出:上传前没有可供丢弃的部署,而自动发布后也不存在丢弃时限。
提供给 AI 智能体的提示
在 `docs/release-guide.md` 第 77-78 行:
**丢弃说明无法阻止发布**
当操作人员在上传前发现版本存在问题并按照丢弃说明操作时,指南会要求他们丢弃一个尚不存在的部署;上传后,`autoPublish=true` 会在验证通过后立即发布,因此没有可用于阻止错误发布的丢弃时限。
请用新的指导替换“丢弃并重新打标签”的恢复说明,明确指出:上传前没有可供丢弃的部署,而自动发布后也不存在丢弃时限。Original comment in English
🟡 Medium · Discard guidance cannot stop release
When an operator finds a release issue before upload and follows the discard instruction, the guide directs operators to discard a deployment that does not yet exist; after upload, autoPublish=true publishes it as soon as validation passes, leaving no discard window to stop an erroneous release.
Replace the discard-and-retag recovery instruction with guidance that reflects there is no deployment to discard before upload and no discard window after automatic publication.
Prompt for AI agents
In `docs/release-guide.md` at lines 77-78:
**Discard guidance cannot stop release**
When an operator finds a release issue before upload and follows the discard instruction, the guide directs operators to discard a deployment that does not yet exist; after upload, `autoPublish=true` publishes it as soon as validation passes, leaving no discard window to stop an erroneous release.
Replace the discard-and-retag recovery instruction with guidance that reflects there is no deployment to discard before upload and no discard window after automatic publication.| | 测试/覆盖率 | 208 tests 全绿;聚合行/分支 100.00% | | ||
|
|
||
| **已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。 | ||
| **已按用户决策修正**:`autoPublish` true→false(首次发版人工核对后手动 Publish);release.yml 注释验证路径改为 DNS TXT(原注释写的 GitHub 仓库验证不适用于 com.wanlianyida)。(0.3.0 起改回 `true`,见 CONTRIBUTING §8) |
There was a problem hiding this comment.
⚪ 低 · 发布说明相互矛盾
当维护者查阅报告以了解当前发布流程时,docs/wop-sdk-report-java.md 声明发布需要手动点击 Publish,并提到 autoPublish=false;而发布指南则称 Portal 验证通过后会自动发布,因此读者会看到相互矛盾的说明。
更新报告中的发布策略描述及相关引用,使其与当前的自动发布流程一致。
另见 docs/release-guide.md:70。
提供给 AI 智能体的提示
在 `docs/wop-sdk-report-java.md` 第 219 行:
**发布说明相互矛盾**
当维护者查阅报告以了解当前发布流程时,`docs/wop-sdk-report-java.md` 声明发布需要手动点击 Publish,并提到 `autoPublish=false`;而发布指南则称 Portal 验证通过后会自动发布,因此读者会看到相互矛盾的说明。
更新报告中的发布策略描述及相关引用,使其与当前的自动发布流程一致。
另见 `docs/release-guide.md:70`。Original comment in English
⚪ Low · Release instructions contradict each other
When a maintainer consults the report to understand the current release process, docs/wop-sdk-report-java.md says releases require manual Publish and refers to autoPublish=false, while the release guide says Portal validation publishes automatically, so readers get conflicting instructions.
Update the report’s release-policy description and reference to match the current automatic-publishing process.
Also at docs/release-guide.md:70.
Prompt for AI agents
In `docs/wop-sdk-report-java.md` at line 219:
**Release instructions contradict each other**
When a maintainer consults the report to understand the current release process, `docs/wop-sdk-report-java.md` says releases require manual Publish and refers to `autoPublish=false`, while the release guide says Portal validation publishes automatically, so readers get conflicting instructions.
Update the report’s release-policy description and reference to match the current automatic-publishing process.
Also at `docs/release-guide.md:70`.
变更
pom.xml的central-publishing配置autoPublishfalse → true:Portal 校验通过即自动发布,去掉每版人工 Portal 环节release.yml步骤名、CONTRIBUTING.md§8、docs/release-guide.md§2.1/§5依据
验证
mvn -P release validate通过(XML + profile 解析)release.ymlYAML 解析通过Sourcery 摘要
在 Portal 验证成功后自动发布到 Maven Central,并使发布指南与新的不可撤销发布流程保持一致。
增强功能:
文档:
Original summary in English
Summary by Sourcery
Enable automatic Maven Central publishing after successful Portal validation and align release guidance with the new irreversible publication workflow.
Enhancements:
Documentation: