Skip to content

01a0dc6b - Accept a place origin that starts with a digit - #9

Merged
TaprootFreak merged 1 commit into
openCryptoPay:developfrom
TaprootFreakAI:fix/accept-digit-leading-place-origin
Oct 8, 2026
Merged

TaprootFreak merged 1 commit into
openCryptoPay:developfrom
TaprootFreakAI:fix/accept-digit-leading-place-origin

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
A place origin may start with a digit, so 21gifts is accepted.
The rest of the rule is unchanged: lowercase letters, digits, and hyphens, length 1 to 32, and no leading hyphen.
Uppercase tokens such as SPAR stay invalid.
PUT and GET accept 21gifts and still reject a bad origin.

DE:
Eine Place-Herkunft darf mit einer Ziffer beginnen, damit 21gifts gültig ist.
Der Rest der Regel bleibt: Kleinbuchstaben, Ziffern und Bindestriche, Länge 1 bis 32, kein führender Bindestrich.
Grossbuchstaben wie SPAR bleiben ungültig.
PUT und GET akzeptieren 21gifts und lehnen eine ungültige Herkunft weiter ab.

Details

The previous origin pattern required a leading letter, so 21gifts was rejected with Place origin is invalid. The pattern is now ^[a-z0-9][a-z0-9-]{0,31}$ after trim.

Still rejected: empty, whitespace only, a leading hyphen, uppercase, a dot, and anything longer than 32 characters. 21.gifts remains a tech provider, not an origin.

The handbook purpose for normalizePlaceOrigin states the new pattern. Unit tests cover the trimmed value, the 32-character limit, and the rejected forms. The route test covers PUT and GET for 21gifts with tech provider 21.gifts and category shopping, and the 400 responses for a leading hyphen and for 21Gifts.

A leading digit is valid, so 21gifts passes the origin check.
Length, lowercase, and the ban on a leading hyphen stay the same.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 1 review passes.
A place origin may start with a digit, so 21gifts is a valid pin origin.

DE:
Bereit nach 1 Review-Durchläufen.
Eine Place-Herkunft darf mit einer Ziffer beginnen, damit 21gifts eine gültige Pin-Herkunft ist.

Details

Head: 520643301d2a1a8850a3e4b8d6400b1363192fce
Runs: conformity-a with logic-a. The second run may be omitted.
Lane conformity-a:
Provider: xAI
Model: grok-4.6
Model number: 1.0.34
Result: pass
Prompt:

Review the complete PR diff for conformity with CONTRIBUTING.md.

Lane logic-a:
Provider: xAI
Model: grok-4.6
Model number: 1.0.34
Result: pass
Prompt:

Review the complete PR diff for logical correctness.

Final result: passes 1, defects 0.
Set aside: none.

{
  "schema": "a38-review/v2",
  "head": "520643301d2a1a8850a3e4b8d6400b1363192fce",
  "passes": 1,
  "defects": 0,
  "set_aside": "none",
  "lanes": [
    {"id": "conformity-a", "result": "pass", "status": "complete", "provider": "xAI", "model": "grok-4.6", "model_number": "1.0.34", "prompt": "Review the complete PR diff for conformity with CONTRIBUTING.md."},
    {"id": "logic-a", "result": "pass", "status": "complete", "provider": "xAI", "model": "grok-4.6", "model_number": "1.0.34", "prompt": "Review the complete PR diff for logical correctness."}
  ]
}

Conformity: the handbook purpose matches the new origin pattern, and no new function or route was added. Logic: PUT and GET both use normalizePlaceOrigin. 21gifts is accepted. A leading hyphen, uppercase, and a 33-character token stay rejected. The 32-character limit is covered.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review October 8, 2026 09:51
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Second review
Second review after 1 review passes.
A place origin may start with a digit, so 21gifts is a valid pin origin.

DE:
Zweiter Review
Zweiter Review nach 1 Review-Durchläufen.
Eine Place-Herkunft darf mit einer Ziffer beginnen, damit 21gifts eine gültige Pin-Herkunft ist.

Details

Head: 520643301d2a1a8850a3e4b8d6400b1363192fce
Runs: conformity-b with logic-b. The second run may be omitted.
Lane conformity-b:
Provider: OpenAI
Model: gpt-5.6-sol
Model number: gpt-5.6-sol
Result: pass
Prompt:

Review the complete PR diff for conformity with CONTRIBUTING.md.

Lane logic-b:
Provider: OpenAI
Model: gpt-5.6-sol
Model number: gpt-5.6-sol
Result: pass
Prompt:

Review the complete PR diff for logical correctness.

Final result: passes 1, defects 0.
Set aside: none.

{
  "schema": "a38-review/v2",
  "head": "520643301d2a1a8850a3e4b8d6400b1363192fce",
  "passes": 1,
  "defects": 0,
  "set_aside": "none",
  "lanes": [
    {"id": "conformity-b", "result": "pass", "status": "complete", "provider": "OpenAI", "model": "gpt-5.6-sol", "model_number": "gpt-5.6-sol", "prompt": "Review the complete PR diff for conformity with CONTRIBUTING.md."},
    {"id": "logic-b", "result": "pass", "status": "complete", "provider": "OpenAI", "model": "gpt-5.6-sol", "model_number": "gpt-5.6-sol", "prompt": "Review the complete PR diff for logical correctness."}
  ]
}

The second run also found no defects. The origin pattern, the handbook line, and the PUT and GET tests match.

@TaprootFreak
TaprootFreak merged commit 1f1e2f6 into openCryptoPay:develop Oct 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants