Skip to content

01a11ae0 - Show whether a shop took a payment recently - #10

Merged
TaprootFreak merged 1 commit into
openCryptoPay:developfrom
TaprootFreakAI:feat/place-activity
Oct 10, 2026
Merged

TaprootFreak merged 1 commit into
openCryptoPay:developfrom
TaprootFreakAI:feat/place-activity

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Map places now say whether the last payment was within 7 days, within 30 days, or not within 30 days.
Providers record that time with the existing ingest token. The place must already exist, and an older or unreadable time does not replace a newer one.

DE:
Kartenorte sagen jetzt, ob die letzte Zahlung innerhalb von 7 Tagen, innerhalb von 30 Tagen oder in den letzten 30 Tagen nicht war.
Anbieter melden den Zeitpunkt mit dem bestehenden Ingest-Token. Der Ort muss schon existieren, und eine ältere oder unlesbare Zeit ersetzt eine neuere nicht.

Details

GET /map/places adds activity on every place: within7Days, within30Days, or none. A missing or unreadable stored time is none. Exactly 7 days is within7Days. Exactly 30 days is within30Days. One millisecond past either boundary moves to the next bucket. A future time stays within7Days.

POST /map/places/transactions uses the same ingest bearer as place create. The body is origin, externalId, and an optional occurredAt. Omitting the time uses the server clock. A time more than 120 seconds in the future is rejected. An unknown place is not created. The stored instant moves forward only and is kept as canonical ISO. The response is the activity at the request clock, so a 40-day-old ping can return none while still storing the time. This route does not call BTC Map.

Places that have never been pinged stay none. Insert and upsert do not clear a stored time.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
First review
Ready after 1 review passes.
The public place list now says whether a shop's last payment was within seven days, within thirty days, or older.

DE:
Erster Review
Bereit nach 1 Review-Durchläufen.
Die öffentliche Ortsliste sagt jetzt, ob die letzte Zahlung eines Ladens innerhalb von sieben Tagen, innerhalb von dreissig Tagen oder älter ist.

Details

Head: f617a8c12eb594d418603c16cb7c03b1db7993b6
Runs: conformity-a with logic-a. The second run may be omitted.

Lane conformity-a:
Provider: xAI
Model: Grok
Model number: grok-4.6
Result: pass
Prompt:

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

Lane logic-a:
Provider: xAI
Model: Grok
Model number: grok-4.6
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": "f617a8c12eb594d418603c16cb7c03b1db7993b6",
  "passes": 1,
  "defects": 0,
  "set_aside": "none",
  "lanes": [
    {"id": "conformity-a", "result": "pass", "status": "complete", "provider": "xAI", "model": "Grok", "model_number": "grok-4.6", "prompt": "Review the complete PR diff for conformity with CONTRIBUTING.md."},
    {"id": "logic-a", "result": "pass", "status": "complete", "provider": "xAI", "model": "Grok", "model_number": "grok-4.6", "prompt": "Review the complete PR diff for logical correctness."}
  ]
}

No defects in this pass.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Second review
Second review after 1 review passes.
The public place list now says whether a shop's last payment was within seven days, within thirty days, or older.

DE:
Zweiter Review
Zweiter Review nach 1 Review-Durchläufen.
Die öffentliche Ortsliste sagt jetzt, ob die letzte Zahlung eines Ladens innerhalb von sieben Tagen, innerhalb von dreissig Tagen oder älter ist.

Details

Head: f617a8c12eb594d418603c16cb7c03b1db7993b6
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": "f617a8c12eb594d418603c16cb7c03b1db7993b6",
  "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."}
  ]
}

No defects in this pass.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review October 8, 2026 11:58
Public places include activity: within the last 7 days, within the last 30 days, or none.
A provider records the time on an existing pin. An older or unreadable time does not replace a newer one.
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft October 8, 2026 16:58
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
First review
Ready after 1 review passes.
The public place list now says whether a shop's last payment was within seven days, within thirty days, or older.

DE:
Erster Review
Bereit nach 1 Review-Durchläufen.
Die öffentliche Ortsliste sagt jetzt, ob die letzte Zahlung eines Ladens innerhalb von sieben Tagen, innerhalb von dreissig Tagen oder älter ist.

Details

Head: 20e4861e1310e9262ec5b6989812c7b8d4b5b153
Runs: conformity-a with logic-a. The second run may be omitted.

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

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

Lane logic-a:
Provider: xAI
Model: grok-4.6
Model number: grok-4.6
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": "20e4861e1310e9262ec5b6989812c7b8d4b5b153",
  "passes": 1,
  "defects": 0,
  "set_aside": "none",
  "lanes": [
    {
      "id": "conformity-a",
      "result": "pass",
      "status": "complete",
      "provider": "xAI",
      "model": "grok-4.6",
      "model_number": "grok-4.6",
      "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": "grok-4.6",
      "prompt": "Review the complete PR diff for logical correctness."
    }
  ]
}

This declaration is for head 20e4861e1310e9262ec5b6989812c7b8d4b5b153 after the branch was rebased onto develop. The earlier review comments belong to f617a8c12eb594d418603c16cb7c03b1db7993b6.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Second review
Second review after 1 review passes.
The public place list now says whether a shop's last payment was within seven days, within thirty days, or older.

DE:
Zweiter Review
Zweiter Review nach 1 Review-Durchläufen.
Die öffentliche Ortsliste sagt jetzt, ob die letzte Zahlung eines Ladens innerhalb von sieben Tagen, innerhalb von dreissig Tagen oder älter ist.

Details

Head: 20e4861e1310e9262ec5b6989812c7b8d4b5b153
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": "20e4861e1310e9262ec5b6989812c7b8d4b5b153",
  "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."
    }
  ]
}

Rejected, not counted.

Conformity named src/lib/map/sqlite.ts:321: recordTransaction is new, and vitest.config.ts excludes src/lib/map/sqlite.ts from bun run test:coverage, while CONTRIBUTING.md excepts only src/index.ts. The exclude is already on the base 9975efe670272fcc9afce456650ac0fc807287ab and is not in this diff. src/lib/map/store.ts says tests use the memory store. The class comment on SqliteMapPlaceStore says insert, list, and delete are exercised by the HTTP end-to-end run. The new decision (missing place, unreadable time, an older or equal time, a newer time) is covered on MemoryMapPlaceStore in src/__tests__/map/store.test.ts. e2e/map.spec.ts records a payment through the HTTP route, which uses the SQLite process, and checks a missing place. Removing the exclude would put the whole pre-existing driver, including schema migration, under the unit gate. This pull request does not widen that exclude.

Logic named src/lib/map/sqlite.ts:349: an update could be lost across two connections. The process opens one store (src/index.ts). recordTransaction does not await between the read and the write, and bun:sqlite is synchronous. The repository has no second connection.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review October 8, 2026 18:04
@TaprootFreak
TaprootFreak merged commit 2b5c297 into openCryptoPay:develop Oct 10, 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