feat(tools/asf-svn): ASF SVN-based tool adapter (svn.apache.org + dist.apache.org), full capability surface like tools/github (#608)#620
Conversation
… and release distribution Signed-off-by: Harsh Mehta <harshmehta010102@gmail.com>
|
The CI is failing as fenced code blocks should have a language specified - it should be easy to fix. |
|
Using the Magpie review skill: Security model — majortools/asf-svn/operations.md (Authentication) documents passing the ASF account password as a command-line argument: The doc itself states this is "the committer's ASF account password (managed at id.apache.org), not a separate token." Passing it on argv exposes it in ps/process listings, shell history, and command logs on the same shared/ephemeral machine the --no-auth-cache note is trying to protect. Recommend omitting --password (let svn prompt) or feeding it via stdin. API / code correctness — majorThe Step 0 auth "write check" uses read-only svn info, which does not verify write access. operations.md labels svn info … | grep "^URL:" a "(write check)" and the broader text says it must "verify that svn has a usable credential with write access." Because svn.apache.org/repos/asf and dist.apache.org/repos/dist are world-readable, svn info exits 0 for a non-committer, so the "hard stop" passes and the failure only surfaces at the real svn commit (E170001). Same false-positive in authorization.md ("confirm dist write access") and release-distribution.md (dist pre-flight). Code quality — minorrelease-distribution.md "Promote a release": prose says "using a server-side SVN copy" and the code comment says "Server-side copy from dev to release," but the command is svn move. Command is correct for ASF promotion; the "copy" wording is misleading (a reader may expect the RC to remain under dev/). Conventions — minortools/asf-svn/README.md omits the Organization: ASF line that tools/AGENTS.md ("Every tool is a directory with a README", point 3) requires for org-bound tools. asf-svn is unambiguously ASF-bound; sibling ASF tools apache-projects and ponymail both carry it. Not CI-enforced when absent, so it won't fail the validator. |
…nd operations Signed-off-by: Harsh Mehta <harshmehta010102@gmail.com>
Resolve docs/labels-and-capabilities.md conflict: adopt the new contract:/substrate: tool-capability taxonomy from apache#641/apache#645 and relabel the tools/asf-svn row to contract:source-control. Update tools/asf-svn README to the new taxonomy and add the Organization: ASF declaration.
|
Hey @HarshMehta112 -> are you going to address the few small issues pointed by @justinmclean -> rebase + fixing it and I will be happy to merge :) |
Hi @potiuk |
potiuk
left a comment
There was a problem hiding this comment.
Nice, thorough adapter — the capability split (source-control / dist / authorization / publishing separable per project) reads well, and the write-path confirmation rules are consistent across the files. Three things worth fixing before merge, plus one advisory.
1. tools/asf-svn/source-control.md:64 — svn mergeinfo arguments are reversed.
The row gives svn mergeinfo --show-revs eligible <branch-url> <trunk-url> with the note "Finds revisions on trunk not yet merged to the branch." eligible SOURCE TARGET lists revisions in SOURCE not yet in TARGET, so as written (SOURCE=branch, TARGET=trunk) it returns revisions on the branch not merged to trunk — the opposite of the note. For the stated goal it should be:
svn mergeinfo --show-revs eligible <trunk-url> <branch-url>
2. tools/asf-svn/publishing.md:77-78 — "Publish a site update" won't propagate deletions.
The comment says "Stage any new or removed files," but svn add --force site-wc/ only schedules additions. For a regenerated site, pages removed during regeneration stay versioned and get re-committed, so stale pages remain live after the commit (and svnpubsub mirrors within seconds). The recipe needs a step that also schedules missing paths for deletion — e.g. svn status | awk '/^!/{print $2}' | xargs -r svn rm before the commit — to match the "removed files" claim.
3. tools/asf-svn/operations.md:90-91 — garbled sentence in the auth guidance.
…argv is visible in
ps, shell history, and process logs on the same shared/ephemeral machine--no-auth-cacheis meant to protect.
Two clauses look merged; as written it doesn't parse and the point of why the password must not be passed on argv is lost. Worth a clean rewrite since it's security guidance.
Advisory: the validator's adapter-authoring [config-keys] SOFT check flags that tools/asf-svn/README.md has no ## Configuration section or project-config reference. tool.md shows the tools_enabled: block, but adding a short config pointer to the README would clear the advisory and make the adapter self-contained.
The dist write-path recipes (stage / svn move promotion / prune / KEYS sync), the two-check auth pre-flight, and the pmc-<project> roster naming all check out.
…e publishing Signed-off-by: Harsh Mehta <harshmehta010102@gmail.com>
potiuk
left a comment
There was a problem hiding this comment.
Thanks @HarshMehta112 — all three points from the earlier review are addressed cleanly:
svn mergeinfoargument order corrected, with a cleareligible SOURCE TARGETnote;- the site-publish recipe now schedules deletions (
svn status … | svn rm) so regenerated sites don't leave stale pages live; - the auth-guidance sentence reads correctly now.
Nice touch adding the ## Configuration section too — it clears the validator's config-keys advisory. Validator's green and CI is clean. Approving. 🚀
Summary
tools/asf-svn/— a complete ASF SVN tool adapter, the SVN counterpart totools/github/: source control (VCS binding),svnCLI operations + credentials pre-flight,dist.apache.orgreleasedistribution, ASF committer/PMC authorization, and optional svnpubsub site publishing.
dist.apache.orgis SVN for every ASF project regardless of where code lives, so even a GitHub-hosted ASF project needs this to steward its release flow; a GitHub-only tool surface isstructurally blind to ASF release infrastructure.
distribution).
Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
skill-and-tool-validatorrun against the working tree — 0 violations ontools/asf-svn/files; capability-sync, tool-README (capability + prerequisites), link, and TOC-anchor checks all green.../and same-dir markdown links verified to resolve to existing targets.distapacheorg,--for em-dash,projects-v2for parens) — the hook is a no-op on thesefiles.
svn/svnmuccrecipe checked for flag/subcommand validity.apache-projectsMCP tool names (get_committee/get_group_members/get_person/search_people) verified againsttools/apache-projects/tool.md— no invented identifiers.prek run --all-files— not run in authoring env (nouv/nodeavailable); doc-only change, no Python/Groovy touched. Please run in CI.RFC-AI-0004 compliance
skill-and-tool-validatorrun against the working tree — 0 violations ontools/asf-svn/files; capability-sync, tool-README (capability + prerequisites), link, and TOC-anchor checks all green.../and same-dir markdown links verified to resolve to existing targets.distapacheorg,--for em-dash,projects-v2for parens) — the hook is a no-op on thesefiles.
svn/svnmuccrecipe checked for flag/subcommand validity.apache-projectsMCP tool names (get_committee/get_group_members/get_person/search_people) verified againsttools/apache-projects/tool.md— no invented identifiers.prek run --all-files— not run in authoring env (nouv/nodeavailable); doc-only change, no Python/Groovy touched. Please run in CI.RFC-AI-0004 compliance
svn commit, dist stage/promote/prune, site publish) is gated on explicit user confirmation in the calling skill; stated in each file's write-path confirmation rule.svn.apache.org,dist.apache.org) declared inREADME.mdPrerequisites.<project>,<asf-id>,<project-config>,<upstream>) used throughout; ASF specifics live in the adapter, not in any skill.apache-projectsMCP value is already public).Linked issues
Closes #608. Refs #602 (generic SVN VCS binding this builds on), #526 (ASF infra bootstrap context).
Notes for reviewers (optional)
capability:setup + capability:resolve(resolve covers the dist promote/prune + publish lifecycle actions). Issue feat(tools/asf-svn): ASF SVN-based tool adapter (svn.apache.org + dist.apache.org), full capability surface like tools/github #608 is labeledcapability:setuponly — if youprefer strict alignment, the
+ capability:resolveis a 2-line revert inREADME.mdand thedocs/labels-and-capabilities.mdrow. Flagged for your call.asf-authorization-templatepath/format: the exact file path within theinfrastructuretree and stanza format are ASF-Infra-maintained and can drift; the doc says so and givessvn listas theconfirmation fallback rather than hard-coding a brittle path.
magpie-vcsSVN backend:source-control.mddocuments the binding as the contract; the runnablemagpie-vcsSVN backend itself remains the feat(tools/subversion): Apache Subversion (SVN) support — ASF svn.apache.org / dist.apache.org #602 extension point — this PR is the doc-adapter layer,not the Python backend.
svnbinary directly.