Consider a generic change-URI metadata/augmentation language (Change API)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 225
- Forks
- 11
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 61
Descripción
Context
In #197, the extension fakes inject failures via an ad-hoc sq-fake=<token>
marker embedded in a change URI, parsed by the test-only core/fakemarker
package (Token([]string) / TokenInChanges([]entity.Change)).
Reviewing that PR, @sbalabanov raised two related design questions:
- Should we build a generic augmentation / metadata language into change
URIs, usable by these fakes and similar tooling — rather than a
fake-specific marker convention? - The marker lookup (
TokenInChanges) arguably belongs on the Change API
(entity.Change) rather than living in a test-only helper.
This issue captures that idea as a follow-up so #197 can land as-is (the marker
stays test-only there).
Design considerations
A generic change-URI metadata facility would need to reconcile with the
strict provider change-ID parsers, which today reject anything that isn't a
canonical resource identifier:
submitqueue/entity/github/change_id.go— requires a full 40-char lowercase
hex head SHA; a?key=valuequery string would not parse.submitqueue/entity/phabricator/change_id.go— fixedphab://form.submitqueue/extension/changeprovider/github/validate.go— rejects
unexpected schemes.
Open questions:
- Scope — is URI-attached metadata a production capability, or strictly a
test/example affordance? Putting parsing onentity.Changecouples the
production type to the convention; keeping it incore/fakemarkerkeeps the
separation the fakes deliberately maintain ("never production"). - Shape — RFC-3986 query params (
?k=v) vs. fragment vs. a dedicated
sidecar field onChange. Query params collide with the strict parsers
above; a typed field avoids string-encoding entirely. - Generality — a neutral
key → valueaccessor (e.g.
Change.URIParam(key)) thatfakemarkerlayerssq-fakesemantics on top
of, vs. a richer metadata model.
References
- PR #197 — fake implementations with error injection
- Threads: the
core/fakemarker.godiscussion in #197.
Filed as a follow-up per the #197 review discussion. Not blocking.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza leyendo la Change API y los parsers referenciados: submitqueue/entity/github/change_id.go, submitqueue/entity/phabricator/change_id.go y submitqueue/extension/changeprovider/github/validate.go. Revisa el PR #197 y la discusión sobre core/fakemarker antes de comparar los parámetros de consulta, los fragmentos y un campo Change tipado. Se considera terminado cuando se hayan resuelto las cuestiones de alcance, forma y generalidad, y se haya documentado o implementado el diseño elegido sin romper la validación estricta de change-ID.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- go
- Área
- backend-api-design
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100