Imported from eshu-hq/eshu (
go/internal/parser/gradle/wrapper/AGENTS.md). Install upstream withnpx skills add eshu-hq/eshu --skill wrapper. Copyright stays with the author.
AGENTS.md - internal/parser/gradle/wrapper
Read first
README.md- status (registered undermetadata), grammar, and what reaches the payload.scan.go-Scan, the row, and the archive-name grammar.lines.go- physical and logical line handling and value assembly.parse.go-Parse, which ignoresIndexSource.
Invariants this package enforces
- Keep the credential contract. Only the version and the distribution type
leave the package. Never copy the URL, host, userinfo, query or any other
property into a row, a count, an error message or the payload.
Parsemust keep ignoringoptions.IndexSource. - Fail closed. Emit a row only for the documented archive-name grammar. Count
everything else in
unsupported_count. - Keep every loop linear and the bounds in
types.go. A value over its bound is dropped, never truncated. - Keep the file name on its own
gradle_wrapperdefinition with themetadatacontent-store policy. Binding it to thegradledefinition, or setting its policy tostore, stores the raw file body.TestDefaultRegistryAdmitsGradleWrapperUnderTheMetadataPolicyandTestGradleWrapperNameStaysOffTheGradleDefinitionpin this.
Common changes
- A new accepted form: add the negative and positive case to
scan_test.gofirst, then the generator case inbounds_test.go. - A change to the emitted row or the grammar: update the README and the
scanner tests, and re-pin the collector fixture digest (
go test ./internal/collector/repo/git/ -run TestGenerationContentVersionPinsCollectorOutput -update-content-version-pin). A change that alters facts for unchanged input also needs agitGenerationContentVersionbump first, then the re-pin: the registry fingerprint hashes bindings only, so a logic change with unchanged bindings does not move it. A binding change moves the fingerprint on its own. Keep the fixture undergo/internal/collector/repo/git/testdata/content_version/jvm/gradle/wrapper/.
