You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java/README.md advertises 1.0.5-01 in its Maven install snippet. java/pom.xml is on 1.0.10-preview.2-SNAPSHOT. Anyone following the primary Java install path gets a version
several releases behind.
It is not a one-off stale string: the release workflow tries to rewrite that snippet on every
release and silently fails to match it, so it stays wrong until the regex is fixed.
The inconsistency
Same "Installation" section, two different versions for one artifact:
Location
Version
java/README.md:35 (Maven)
1.0.5-01
java/README.md:42 (Gradle)
1.0.9-preview.2-01
java/pom.xml:10 (authoritative)
1.0.10-preview.2-SNAPSHOT
CHANGELOG.md:85 dates java/v1.0.5-01 to 2026-07-01; the newest Java entry is java/v1.0.6 at line 67.
Root cause
.github/workflows/java-publish-maven.yml:204-205:
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*</version>|<version>${VERSION}</version>|g" README.md
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md
The qualifier group \(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)* requires a qualifier to start with a
letter and contain a .N part. -01 satisfies neither, so:
Sed #1 cannot match <version>1.0.5-01</version> (after 1.0.5 it needs </version>,
finds -01). The Maven snippet has never been bumped.
Sed Fix snapshot filename collisions on case-insensitive filesystems #2 matches only the copilot-sdk-java:1.0.9-preview.2 prefix and leaves -01 in place,
carrying it forward each release. That is where 1.0.9-preview.2-01 came from; it is a sed
artifact, not a real coordinate.
The workflow's own validator at line 178, ^[0-9]+\.[0-9]+\.[0-9]+(-(preview|(beta-)?java(-preview)?)\.[0-9]+)?$, rejects -01
versions, so this pipeline cannot even emit the coordinates its docs advertise.
Reproduction
Run those two seds with VERSION="1.0.11-preview.1" over the repo's real version strings.
Actual output (GNU sed, verified locally):
Expected: line 1 rewritten, line 3 without the trailing -01.
Why CI misses it
java/src/test/java/com/github/copilot/DocumentationSamplesTest.java reads README.md and jbang-example.java (documentationFiles(), lines 132-138) but only asserts setOnPermissionRequest usage. No version assertion exists anywhere.
.github/workflows/java-smoke-test.yml:55 builds from source and consumes the local
SNAPSHOT, so it never resolves the README's pinned release version.
No workflow compiles or runs jbang-example.java; jbang is never installed in CI.
Suggested fix
Widen the qualifier group to accept numeric-only qualifiers, e.g. \(-[a-z0-9][a-z0-9.-]*\)\?, and anchor the copilot-sdk-java: replacement so it consumes
the whole coordinate. Re-test against the SNAPSHOT lines too: the comment at lines 206-208
shows the snapshot seds depend on the release seds matching first.
Drop the -01 suffixes; use versions the line 178 validator accepts.
Add a CI guard asserting documented coordinates match java/pom.xml. DocumentationSamplesTest already loads both files.
Also in that section: duplicate ### Gradle headings at java/README.md:39 and :65 (the root README.md:27 anchor can only reach the first), and lines 65-70 say "latest release from Maven
Central" while showing a -SNAPSHOT.
Not verified
No network access here, so which versions actually exist on Maven Central is unconfirmed.
Everything else is backed by repo files at main plus the local sed run.
Summary
java/README.mdadvertises1.0.5-01in its Maven install snippet.java/pom.xmlis on1.0.10-preview.2-SNAPSHOT. Anyone following the primary Java install path gets a versionseveral releases behind.
It is not a one-off stale string: the release workflow tries to rewrite that snippet on every
release and silently fails to match it, so it stays wrong until the regex is fixed.
The inconsistency
Same "Installation" section, two different versions for one artifact:
java/README.md:35(Maven)1.0.5-01java/README.md:42(Gradle)1.0.9-preview.2-01java/pom.xml:10(authoritative)1.0.10-preview.2-SNAPSHOTCHANGELOG.md:85datesjava/v1.0.5-01to 2026-07-01; the newest Java entry isjava/v1.0.6at line 67.Root cause
.github/workflows/java-publish-maven.yml:204-205:The qualifier group
\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*requires a qualifier to start with aletter and contain a
.Npart.-01satisfies neither, so:<version>1.0.5-01</version>(after1.0.5it needs</version>,finds
-01). The Maven snippet has never been bumped.copilot-sdk-java:1.0.9-preview.2prefix and leaves-01in place,carrying it forward each release. That is where
1.0.9-preview.2-01came from; it is a sedartifact, not a real coordinate.
The workflow's own validator at line 178,
^[0-9]+\.[0-9]+\.[0-9]+(-(preview|(beta-)?java(-preview)?)\.[0-9]+)?$, rejects-01versions, so this pipeline cannot even emit the coordinates its docs advertise.
Reproduction
Run those two seds with
VERSION="1.0.11-preview.1"over the repo's real version strings.Actual output (GNU sed, verified locally):
Expected: line 1 rewritten, line 3 without the trailing
-01.Why CI misses it
java/src/test/java/com/github/copilot/DocumentationSamplesTest.javareadsREADME.mdandjbang-example.java(documentationFiles(), lines 132-138) but only assertssetOnPermissionRequestusage. No version assertion exists anywhere..github/workflows/java-smoke-test.yml:55builds from source and consumes the localSNAPSHOT, so it never resolves the README's pinned release version.
jbang-example.java; jbang is never installed in CI.Suggested fix
\(-[a-z0-9][a-z0-9.-]*\)\?, and anchor thecopilot-sdk-java:replacement so it consumesthe whole coordinate. Re-test against the SNAPSHOT lines too: the comment at lines 206-208
shows the snapshot seds depend on the release seds matching first.
-01suffixes; use versions the line 178 validator accepts.java/pom.xml.DocumentationSamplesTestalready loads both files.Also in that section: duplicate
### Gradleheadings atjava/README.md:39and:65(the rootREADME.md:27anchor can only reach the first), and lines 65-70 say "latest release from MavenCentral" while showing a
-SNAPSHOT.Not verified
No network access here, so which versions actually exist on Maven Central is unconfirmed.
Everything else is backed by repo files at
mainplus the local sed run.