Skip to content

specs/functions: payment-ai-server-process -- claim-invoice before crediting - #4116

Merged
gHashTag merged 5 commits into
masterfrom
payment-claim-spec
Oct 2, 2026
Merged

gHashTag merged 5 commits into
masterfrom
payment-claim-spec

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #4115

Money loop, plan section 6 item 3 (999-multibots-telegraf docs/audit/inngest-improvement-plan-2026-09-13.md). STEPS gains claim-invoice between get-bot-config and update-user-balance; NOTE records the compare-and-set on PENDING, the amount == rounded IncSum check, the already_claimed return, the retriable db-error, what was wrong before and what is not verified (the event sender is outside the repo). SERVICE line corrected 64 -> 66.

  • docs/now/2026-09-17-the-invoice-is-claimed-before-it-is-credited.md.
  • Compiler verdict clean: typecheckOk, 0 errors, hirOk. ASCII only. No test blocks added; the pre-existing published_figures drift on master is untouched.

Code: 999-multibots-telegraf branch payment-claim-invoice.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-17 09:17:14 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 0
PRs with All Checks Green 50
READY 0
FAILING 0
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 0 + 0 + 0 = 0, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8932aae0c5a9 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

This was referenced Sep 17, 2026
gHashTag and others added 2 commits October 3, 2026 03:19
…g.ts:67 (999 main @7d48227)

The createFunction call moved from line 66 to 67 on 999-multibots-telegraf
main; the header comment said L64. Both now name the line the code is on.
STEPS and RETRIES re-read on the same revision and unchanged.

Refs #4115

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 20:20:43 UTC

Summary

Status Count
Total Open PRs 34
PRs with Failing Checks 32
PRs with All Checks Green 2
READY 1
FAILING 32
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 32 + 0 + 0 = 33, and there are 34 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 20:21:12 UTC

Summary

Status Count
Total Open PRs 34
PRs with Failing Checks 33
PRs with All Checks Green 1
READY 1
FAILING 33
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag

gHashTag commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

bee review (not merged) -- head 1b29c4a16d6224a2e3687c78b5363460424d73c7, master 7079823ca7c5

Content is sound:

  • Anchor verified on gHashTag/999-multibots-telegraf main 6a6dfbe4: paymentProcessing.ts:67 is export const processPayment = inngest.createFunction(; retries: 3 (L73), onFailure createInngestFailureHandler (L74).
  • STEPS verified in source order: check-subscription-plan (L114), check-payment-option (L138), get-user-info (L156), get-bot-config (L168), claim-invoice (L197), update-user-balance (L223), send-notification (L253).
  • NOTE matches the code: claimPendingInvoice exists (unknown-invoice / amount-mismatch -> NonRetriableError, already-claimed -> {success:true, already_claimed:true}, db-error -> plain Error); the cited test src/__tests__/money/paymentClaimInvoice.test.ts exists on main.
  • Closes #4115 is the matching issue. Required validate, check-linked-issue, parse-ratchet: green.
  • build (3 Coq files joined a build), integrity-gate and pack-index-consistency (gf16/gf10/gf256 pack shas) are about files this PR does not touch; same failures on classify: the browser could not tell a Markdown file from a broken spec (refs #2133) #4541. Not blockers.

Blocker: check-now-freshness is red and the PR causes it -- docs/now/2026-09-17-...md is outside the window 2026-10-01..2026-10-03 ("docs/now/ entry present but none qualifies"). Master is green on it.

To clear: re-date the NOW entry (or add one dated today) on the branch.

gHashTag and others added 2 commits October 3, 2026 03:49
The NOW sync gate reads the entry date from the filename and accepts only
yesterday..tomorrow UTC. The entry was dated 2026-09-17; it is moved to
2026-10-03 with its heading, and a line says it was re-dated for re-review.

Refs #4115

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit staged only the rename; the heading still said
2026-09-17, which the shape check rejects against a 2026-10-03 filename.

Refs #4115

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 20:50:58 UTC

Summary

Status Count
Total Open PRs 34
PRs with Failing Checks 30
PRs with All Checks Green 4
READY 1
FAILING 30
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 30 + 0 + 0 = 31, and there are 34 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-02 21:00:01 UTC

Summary

Status Count
Total Open PRs 34
PRs with Failing Checks 30
PRs with All Checks Green 4
READY 1
FAILING 30
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 30 + 0 + 0 = 31, and there are 34 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b45a356c2eb6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag

gHashTag commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

Bee review evidence -- #4116 at 629df857ea9820f969e81799da1b3bafcac36f9e

  • Diff re-read: specs/functions/payment-ai-server-process.t27 moves its anchor to paymentProcessing.ts:67 @7d48227 and inserts the claim-invoice step between get-bot-config and update-user-balance (STEPS [6] -> [7]; the array length matches). The NOTE is updated, and there is a NOW entry.
  • Re-date commits: 920bb85cf is a pure rename (+0 -0) docs/now/2026-09-17-the-invoice-is-claimed-before-it-is-credited.md -> 2026-10-03-.... 629df857e changes the heading date 2026-09-17 -> 2026-10-03 and appends a ## Re-dated section stating the original date (2026-09-17, matching the old filename). Nothing else changed.
  • Mergeable: MERGEABLE after specs/functions: crm-proactive-sweep -- one step per seller after the 502 runs #4113 landed (master now 2dc66ff17; the two PRs share no files). Required checks (validate, parse-ratchet, check-linked-issue) pass; check-now-freshness and Check L1 TRACEABILITY pass. The non-required L1 Traceability Summary job has been sitting in the runner queue since 21:11Z, after the traceability check it summarises passed.
  • Red non-required: untrusted-input, spec-guards (also red on master), and emit-bitexact (on the known master-wide list). No red check is specific to this PR.

@t27-bees t27-bees Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bee review: see evidence comment

@gHashTag
gHashTag merged commit 3fddac4 into master Oct 2, 2026
32 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec payment-ai-server-process: claim-invoice compare-and-set and amount check

1 participant