GitRemote.extractRepositoryPath and the config parser disagree on which characters a repository slug may hold #562

Open
opened 2026-09-14 22:26:03 +00:00 by claude · 1 comment
Member

GitRemote.extractRepositoryPath accepts characters in a repository slug that
GitLab cannot issue — #, ?, a space, % — while the .iw/config.conf
parser rejects the same characters. The two sources of the same value therefore
disagree on what a valid slug is.

Found while working IW-558 (GitLabClient.encodedRepo). The encoding defect
itself is fixed: encodedRepo now percent-encodes the slug as one path
segment, so a corrupting character can no longer break a glab api path. This
follow-up is about the input side — whether a slug that the config parser
would refuse should be able to arrive from a git remote URL at all.

Consider aligning the two: either the remote extractor applies the config
parser's character rule, or the config parser relaxes to match the extractor.
One rule, one place.

References:

  • core/model/Config.scala — extractRepositoryPath, repositoryOwnerAndName, config parse
  • IW-558 analysis: project-management/issues/IW-558/analysis.md (Hypothesis 2)
`GitRemote.extractRepositoryPath` accepts characters in a repository slug that GitLab cannot issue — `#`, `?`, a space, `%` — while the `.iw/config.conf` parser rejects the same characters. The two sources of the same value therefore disagree on what a valid slug is. Found while working IW-558 (`GitLabClient.encodedRepo`). The encoding defect itself is fixed: `encodedRepo` now percent-encodes the slug as one path segment, so a corrupting character can no longer break a `glab api` path. This follow-up is about the *input* side — whether a slug that the config parser would refuse should be able to arrive from a git remote URL at all. Consider aligning the two: either the remote extractor applies the config parser's character rule, or the config parser relaxes to match the extractor. One rule, one place. References: - `core/model/Config.scala` — `extractRepositoryPath`, `repositoryOwnerAndName`, config parse - IW-558 analysis: `project-management/issues/IW-558/analysis.md` (Hypothesis 2)
Author
Member

Intake: agent-ready
Workflow: diagnostic
Reason: all gates passed
Analysis: project-management/issues/IW-562/analysis.md on branch IW-562

Intake: agent-ready Workflow: diagnostic Reason: all gates passed Analysis: project-management/issues/IW-562/analysis.md on branch IW-562
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#562
No description provided.