{"id":"XE-0668","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":210,"title":"[Medium] core.IsRetryableError matches bare \"not found\", so permanent lease rejections are classified retryable - the provider destroys and re-creates the tenant VM on every attempt (node.go:1617)","area":"node-api","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-05T11:06:33.447823+00:00","updated_at":"2026-11-05T22:26:41.168534+00:00","source_created_at":null,"told_at":"2026-11-05T22:26:41.280615+00:00","status_changed_at":"2026-11-05T22:26:41.235331+00:00","url":"https://bounty.xe.network/XE-0668","body":"# [Medium] `core.IsRetryableError` matches the bare substring `\"not found\"`, so permanent lease rejections are classified retryable — the provider then destroys and re-creates the tenant's VM on every attempt (`node/node.go:1617`)\r\n\r\n## Summary\r\n\r\n`core.IsRetryableError` (`core/retryable.go`) decides whether a failed operation should be retried by looking for **substrings in the error text**. Its pattern list contains the bare three-word string `\"not found\"` (`core/retryable.go:13`):\r\n\r\n```go\r\n// core/retryable.go:5-35\r\nfunc IsRetryableError(err error) bool {\r\n\tif err == nil {\r\n\t\treturn false\r\n\t}\r\n\tmsg := err.Error()\r\n\tretryablePatterns := []string{\r\n\t\t\"previous block not found\",\r\n\t\t\"source send not pending\",\r\n\t\t\"not found\",              // <-- line 13: matches ANY error whose text contains these words\r\n\t\t\"frontier mismatch\",\r\n\t\t\"previous mismatch\",\r\n\t\t\"GetAccountChain\",\r\n\t\t\"GetBlock\",\r\n\t\t\"unresolved conflict\",\r\n\t\t\"Transaction Conflict\",\r\n\t\t\"lease not yet accepted\",\r\n\t\t\"epoch not yet available\",\r\n\t\t\"retry after statechain syncs\",\r\n\t\t\"retry after sync\",\r\n\t\t\"unopened account\",\r\n\r\n\t\t\"unknown block type\",\r\n\t\t\"not yet activated\",\r\n\t}\r\n\tfor _, p := range retryablePatterns {\r\n\t\tif strings.Contains(msg, p) {\r\n\t\t\treturn true\r\n\t\t}\r\n\t}\r\n\treturn false\r\n}\r\n```\r\n\r\nThe matcher is **lexical, not semantic**: it cannot tell \"the block I depend on has not arrived yet\" (genuinely transient) from \"the lease record this operation requires does not exist and never will\" (permanent, deterministic). On `master` @ `02e9641` **14 permanent, deterministic error messages** produced by the ledger and the stores are therefore classified retryable purely because of how they are worded — including two messages emitted by the *same* production guard, one after the other, with opposite verdicts.\r\n\r\n`core.IsRetryableError` has exactly five consumers:\r\n\r\n| consumer | what the verdict controls |\r\n|---|---|\r\n| `api/handler.go:413` (`writeSubmitError`) | HTTP 503 `retryable:true` vs 400 `retryable:false` — the documented API contract |\r\n| `core/quorum.go:328` (`confirmConflict`) | whether a failed promotion is quarantined or retried |\r\n| `core/quorum.go:387` (`appendStagedWinner`) | whether the error is swallowed and the winner silently dropped |\r\n| `net/sync.go:609` (`requestSync`) | whether a dependency-rejected block is retried or discarded |\r\n| **`node/node.go:1617` (`autoAcceptLease`)** | **whether the provider keeps re-attempting the tenant's `lease_accept` — after destroying the tenant's VM** |\r\n\r\nThe last one is the only consumer whose misclassification is **destructive**. In `autoAcceptLease` the provider provisions the tenant's VM *first* (`node/node.go:1554`) and only then submits the `lease_accept` (`node/node.go:1612`). If the accept is rejected, the node **tears the VM down** and then asks the classifier whether to try again:\r\n\r\n```go\r\n// node/node.go:1612-1621\r\nif err := n.Ledger.AddBlock(b); err != nil {\r\n\tn.blockCreateMu.Unlock()\r\n\tlog.Printf(\"Failed to add lease_accept: %v\", err)\r\n\tif shouldTeardownOnAcceptFailure(n.GetLease(leaseBlock.Hash), myAddr) {\r\n\t\tn.teardownVM(&core.Lease{LeaseHash: leaseBlock.Hash})   // 1616: destroy the tenant's VM\r\n\t\tretry = core.IsRetryableError(err)                      // 1617: the classifier decides the future\r\n\t} else {\r\n\t\tlog.Printf(\"Lease %s: our accept already stands on-chain, keeping VM\", shortHash(leaseBlock.Hash))\r\n\t}\r\n\treturn\r\n}\r\n```\r\n\r\nA **retryable** verdict therefore means: *destroy the tenant's VM, then build a brand-new one on the next attempt, forever.* The accept-retry scheduler has no attempt cap and its backoff saturates at 160 s; the 5-second lease-watch re-drives the lease for as long as it is pending:\r\n\r\n```go\r\n// node/node.go:1633-1648\r\nvar (\r\n\tacceptRetryQuick = 5 * time.Second\r\n\tacceptRetryBase  = AttestationRateLimit + 5*time.Second   // 15s + 5s = 20s\r\n\tacceptRetryMax   = 160 * time.Second\r\n)\r\n\r\nfunc acceptRetryDelay(failures int) time.Duration {\r\n\tif failures == 0 {\r\n\t\treturn acceptRetryQuick\r\n\t}\r\n\tdelay := acceptRetryBase\r\n\tfor i := 1; i < failures && delay < acceptRetryMax; i++ {\r\n\t\tdelay *= 2\r\n\t}\r\n\treturn min(delay, acceptRetryMax)\r\n}\r\n\r\n// node/node.go:1726-1745 — record(): no attempt cap, no permanent-failure exit\r\nfunc (s *acceptSchedule) record(leaseHash string, retry bool, now time.Time) {\r\n\t...\r\n\tif !retry {\r\n\t\tst.done = true\r\n\t\treturn\r\n\t}\r\n\tdelay := acceptRetryDelay(st.failures)\r\n\tst.failures++\r\n\tst.next = now.Add(delay)\r\n\tlog.Printf(\"Lease %s: retrying accept in %v\", shortHash(leaseHash), delay)\r\n}\r\n```\r\n\r\nThe only ways the loop ends are (a) the classifier returning `false`, or (b) the lease ceasing to be pending (`n.acceptSched.prune(live)`, `node/node.go:1698`). There is no maximum attempt count and no \"this can never succeed\" detection anywhere on this path.\r\n\r\nThis report demonstrates, with a deterministic PoC against the production code paths:\r\n\r\n1. the classifier is lexical — 22 production error strings, 22 documented expectations, and the decisive pair emitted by **one** production guard with **opposite** verdicts;\r\n2. with a permanent `\"not found\"` rejection of the provider's accept, the provider **destroys and re-creates the tenant's VM on every attempt, without bound** (5 attempts → 5 provisions → 5 teardowns, retry delay saturated at 160 s, `done=false`, and the `lease_accept` never lands);\r\n3. with the **same node-visible state** and the **same accept path**, a rejection whose text does not contain `\"not found\"` produces **exactly one attempt** (1 provision → 1 teardown → `done=true`);\r\n4. the production unwind path (`Ledger.SwapBlock`) really does produce the `\"not found\"` rejection that the classifier calls retryable.\r\n\r\n## Affected component and versions\r\n\r\n- `xeprotocol/xe`, `master` @ `02e9641` (`Merge pull request #251 from xeprotocol/fix/dao-tool-timestamp`). **No PR is required.**\r\n- Code paths: `core/retryable.go` (the matcher), `node/node.go` (`autoAcceptLease`, `leaseWatchTick`, `leaseWatchLoop`, `acceptSchedule`, `acceptRetryDelay`, `shouldTeardownOnAcceptFailure`, `leaseAlreadyAccepted`), `node/vm.go` (`provisionVM`, `teardownVM`), `core/ledger.go` (`validateAndAddLeaseAccept`, `validateAndAddLease`), `store/mem_store.go` + `store/badger_store.go` (the lease-state CAS guard), `core/rollback.go` (`buildBlockUndo`).\r\n- No network measurement was performed and no live node was contacted: the PoC is a deterministic local unit test (fake clock via `core.Now`, fixed keys, no wall-clock dependence). The only substitution is `vm.MockManager` for the QEMU/Lima backends — the node calls the same `vm.Manager` interface either way, and the backend is not where the defect is.\r\n\r\n## Root cause\r\n\r\n### 1. The classifier is a substring matcher, and one of its patterns is `\"not found\"`\r\n\r\n`core.IsRetryableError` is called with errors that come from many different subsystems, and it has no type information to work with — `strings.Contains(msg, p)` is the whole decision. The bare `\"not found\"` pattern then matches **every** error whose text happens to contain those three words, regardless of what the words mean.\r\n\r\nPermanent, deterministic errors on `master` that are classified **retryable** because of it:\r\n\r\n| # | message (verbatim from the source) | source | permanent because |\r\n|---|---|---|---|\r\n| 1 | `source lease block not found: <hash>` | `core/ledger.go:1620` | the referenced `lease_open` block is not in this node's store; the accept can never validate against it |\r\n| 2 | `lease_accept: certificate not found: <hash>` | `core/ledger.go:1692` | the pinned certificate is not held; the accept can never validate |\r\n| 3 | `certificate <hash> not found` | `core/ledger.go:1537` | the pinned certificate is not held |\r\n| 4 | `source lease block not found: <hash>` | `core/ledger.go:1805` (`lease_cancel`) | the referenced `lease_open` is not in this node's store |\r\n| 5 | `source lease block not found: <hash>` | `core/ledger.go:1892` (`lease_settle`) | same |\r\n| 6 | `lease not found: <hash>` | `core/ledger.go:1909` (`lease_renew`) | the lease record does not exist |\r\n| 7 | `lease not found: <hash>` | `core/ledger.go:2133` (`lease_force_settle`) | the lease record does not exist |\r\n| 8 | `multisig_update: account not found` | `core/ledger.go:1326` | the account does not exist |\r\n| 9 | `SwapBlock: account <addr> not found` | `core/ledger.go:2895` | the account does not exist |\r\n| 10 | `SwapBlock: block <hash> not found in chain` | `core/ledger.go:2908` | the block is not in the chain |\r\n| 11 | `GetBlockHeight: account <addr> not found` | `core/ledger.go:3048` | the account does not exist |\r\n| 12 | `GetBlockHeight: block <hash> not found in account <addr>` | `core/ledger.go:3055` | the block is not in the chain |\r\n| 13 | `CommitBlock: lease state conflict: lease <hash> not found` | `store/mem_store.go:293`, `store/badger_store.go` | the lease record the accept's CAS requires does not exist |\r\n| 14 | `undo: lease <hash> not found while reversing lease_accept` | `core/rollback.go:253` | the lease record needed to reverse the accept does not exist |\r\n\r\nThe decisive detail is that **two of these come from the same production guard**, one line apart, and the *only* difference between them is the wording:\r\n\r\n```go\r\n// store/mem_store.go:288-304 — the lease CAS the provider's accept goes through\r\nfunc (m *MemStore) applyCommitLocked(c *core.BlockCommit) error {\r\n\tif c.ExpectLeaseHash != \"\" {\r\n\t\tlease, ok := m.leases[c.ExpectLeaseHash]\r\n\t\tif !ok {\r\n\t\t\treturn fmt.Errorf(\"CommitBlock: %w: lease %s not found\", core.ErrLeaseStateConflict, c.ExpectLeaseHash[:12])        // 293 -> retryable = TRUE\r\n\t\t}\r\n\t\tif lease.State != c.ExpectLeaseState {\r\n\t\t\treturn fmt.Errorf(\"CommitBlock: %w: lease %s is %s, want %s\",\r\n\t\t\t\tcore.ErrLeaseStateConflict, c.ExpectLeaseHash[:12], lease.State, c.ExpectLeaseState)                           // 296 -> retryable = FALSE\r\n\t\t}\r\n\t\t...\r\n```\r\n\r\nBoth are the same permanent class of failure — `core.ErrLeaseStateConflict`, the lease record does not satisfy the accept's expectation — and both are **deterministic**: retrying cannot change the outcome. Yet one is \"retryable\" and the other is not, purely because one sentence contains the word \"not\".\r\n\r\n### 2. The provider's accept path consumes that verdict destructively\r\n\r\n`node/node.go:1460-1631` (`autoAcceptLease`) is the provider side of a lease. The relevant sequence is:\r\n\r\n```go\r\n// node/node.go:1460-1469\r\nfunc (n *Node) autoAcceptLease(leaseBlock *core.Block) {\r\n\t...\r\n\tretry := false\r\n\tdefer func() { n.acceptSched.record(leaseBlock.Hash, retry, time.Now()) }()\r\n\tif leaseAlreadyAccepted(n.GetLease(leaseBlock.Hash)) {\r\n\t\treturn\r\n\t}\r\n\t...\r\n// node/node.go:1554 — the VM is created BEFORE the accept is attempted\r\n\tn.provisionVM(leaseBlock)\r\n\t...\r\n// node/node.go:1612-1621 — the accept is attempted, and on failure the VM is destroyed\r\n\tif err := n.Ledger.AddBlock(b); err != nil {\r\n\t\tn.blockCreateMu.Unlock()\r\n\t\tlog.Printf(\"Failed to add lease_accept: %v\", err)\r\n\t\tif shouldTeardownOnAcceptFailure(n.GetLease(leaseBlock.Hash), myAddr) {\r\n\t\t\tn.teardownVM(&core.Lease{LeaseHash: leaseBlock.Hash})   // 1616\r\n\t\t\tretry = core.IsRetryableError(err)                      // 1617\r\n\t\t} else {\r\n\t\t\tlog.Printf(\"Lease %s: our accept already stands on-chain, keeping VM\", shortHash(leaseBlock.Hash))\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n```\r\n\r\nand the re-drive that makes it a *loop* rather than a single retry:\r\n\r\n```go\r\n// node/node.go:1657-1668 — every 5 seconds\r\nfunc (n *Node) leaseWatchLoop() {\r\n\tticker := time.NewTicker(5 * time.Second)\r\n\t...\r\n\tcase now := <-ticker.C:\r\n\t\tn.leaseWatchTick(now, &n.wg)\r\n\t...\r\n}\r\n\r\n// node/node.go:1670-1699\r\nfunc (n *Node) leaseWatchTick(now time.Time, wg *sync.WaitGroup) {\r\n\tmyAddr := n.KeyPair.Address()\r\n\tpending := n.Ledger.GetPendingForAccount(myAddr)\r\n\tlive := make(map[string]bool, len(pending))\r\n\tfor _, p := range pending {\r\n\t\tlive[p.SendHash] = true\r\n\t\tif !n.acceptSched.due(p.SendHash, now) || n.acceptRunning(p.SendHash) {\r\n\t\t\tcontinue\r\n\t\t}\r\n\t\tleaseBlock := n.Ledger.GetBlock(p.SendHash)\r\n\t\tif leaseBlock == nil || leaseBlock.Type != core.BlockLease {\r\n\t\t\tcontinue\r\n\t\t}\r\n\t\t...\r\n\t\tif leaseAlreadyAccepted(n.GetLease(leaseBlock.Hash)) {\r\n\t\t\tn.acceptSched.record(leaseBlock.Hash, false, now)\r\n\t\t\tcontinue\r\n\t\t}\r\n\t\tlog.Printf(\"Lease watch: found unaccepted lease %s, auto-accepting\", shortHash(leaseBlock.Hash))\r\n\t\twg.Add(1)\r\n\t\tgo func() {\r\n\t\t\tdefer wg.Done()\r\n\t\t\tn.autoAcceptLease(leaseBlock)\r\n\t\t}()\r\n\t}\r\n\tn.acceptSched.prune(live)\r\n}\r\n```\r\n\r\n`acceptSchedule.due()` returns true forever once the lease is pending and the entry is not `done`:\r\n\r\n```go\r\n// node/node.go:1719-1724\r\nfunc (s *acceptSchedule) due(leaseHash string, now time.Time) bool {\r\n\ts.mu.Lock()\r\n\tdefer s.mu.Unlock()\r\n\tst, ok := s.leases[leaseHash]\r\n\treturn !ok || (!st.done && !now.Before(st.next))\r\n}\r\n```\r\n\r\nSo the whole lifetime of the loop is decided by one boolean: `core.IsRetryableError(err)`.\r\n\r\n### 3. What each cycle costs the provider and the tenant\r\n\r\nEach cycle is a **full VM lifecycle**, not a no-op:\r\n\r\n- `provisionVM` (`node/vm.go:69-103`) creates a brand-new instance through the backend. The Lima backend runs `limactl create` + `limactl start` (`vm/lima_manager.go:118-131`) — a new VM, a new disk, a new boot; the QEMU backend does the equivalent. The tenant's SSH key is re-installed, so the tenant can still log in, but **the machine is a different instance and everything on it is gone**.\r\n- `provisionVM` also **announces the VM to the consumer** before the accept is even attempted (`node/vm.go:89-102`: `n.Msg.Request(ctx, consumerPeer, \"vm_credentials\", info)`). On a rejected accept the provider then deletes that very instance (`node/node.go:1616`), so the consumer is told about a machine that is already being destroyed, and is told again — about a different instance — on the next attempt. *(This path is read from the source; the PoC harness has no network and does not exercise the credential delivery.)*\r\n- `teardownVM` (`node/vm.go:105-114`) deletes the instance. The provider pays full instance-creation cost per cycle: image boot, disk provisioning, SSH-port wait (`waitForSSHPort`, up to 2 minutes on Lima) — for a lease that will never be accepted.\r\n- The `lease_accept` **never lands**, so the lease is never served: the provider is doing all of this work for a lease that stays in state `created` forever.\r\n\r\n### 4. Why the same rejection, worded differently, is not a loop\r\n\r\n`shouldTeardownOnAcceptFailure` decides whether the VM is destroyed; the *classifier* decides whether the attempt is repeated. They are independent:\r\n\r\n```go\r\n// node/node.go:1436-1438, 1456-1458\r\nfunc leaseAlreadyAccepted(lease *core.Lease) bool {\r\n\treturn lease != nil && lease.State != core.LeaseCreated\r\n}\r\n\r\nfunc shouldTeardownOnAcceptFailure(lease *core.Lease, myAddr string) bool {\r\n\treturn !leaseAlreadyAccepted(lease) || lease.Provider != myAddr\r\n}\r\n```\r\n\r\nSo for a lease whose record is missing or still in state `created` (the normal pre-accept state), **every** failed accept destroys the VM, and whether the attempt is repeated depends only on the text of the error. The PoC demonstrates the pair directly:\r\n\r\n- rejection text `CommitBlock: lease state conflict: lease <hash> not found` → `IsRetryableError = true` → destroy + re-create, forever;\r\n- rejection text `lease_accept attestation: only 0 valid attestations from trusted timekeepers, need 1` → `IsRetryableError = false` → destroy once, stop.\r\n\r\nBoth are permanent. Only one of them contains the word \"not\".\r\n\r\n## Reproduction\r\n\r\nDeterministic PoC: `node/retryable_accept_loop_test.go` — four tests, no network, no wall-clock dependence (fake clock via `core.Now`, base `time.Unix(1700000000,0)`), fixed keys, `vm.MockManager` behind the production `vm.Manager` interface. **Nothing is stubbed**: `core.IsRetryableError`, `autoAcceptLease`, `leaseWatchTick`, `acceptSchedule`, `core.Ledger`, `store.MemStore` and `Ledger.SwapBlock` are all the production implementations.\r\n\r\n```\r\ngo test ./node/ -run \"TestRetryableClassifierIsLexicalNotSemantic|TestProviderAcceptPermanentNotFoundEntersUnboundedRetryLoop|TestProviderAcceptPermanentNonNotFoundStopsAfterOneAttempt|TestLeaseOpenUnwindMakesProviderAcceptFailWithNotFound\" -v -count=1\r\n```\r\n\r\nVerbatim output:\r\n\r\n```\r\n=== RUN   TestRetryableClassifierIsLexicalNotSemantic\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1620 lease_accept             :: source lease block not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1692 lease_accept             :: lease_accept: certificate not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1537 lease_open               :: certificate 4f3a2b1c9d8e not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1805 lease_cancel             :: source lease block not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1892 lease_settle             :: source lease block not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1909 lease_renew              :: lease not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:2133 lease_force_settle       :: lease not found: 4f3a2b1c9d8e\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:1326                          :: multisig_update: account not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:2895                          :: SwapBlock: account 4f3a2b1c not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:2908                          :: SwapBlock: block 4f3a2b1c not found in chain\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:3048                          :: GetBlockHeight: account 4f3a2b1c not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/ledger.go:3055                          :: GetBlockHeight: block 4f3a2b1c not found in account 4f3a2b1c\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent store/mem_store.go:293                       :: CommitBlock: lease state conflict: lease 4f3a2b1c not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=permanent core/rollback.go:253                         :: undo: lease 4f3a2b1c not found while reversing lease_accept\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent core/ledger.go:1634 lease_accept             :: lease already accepted\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent core/ledger.go:1640                          :: lease_accept stake mismatch: expected 667, got 1\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent core/ledger.go:1662                          :: insufficient XUSD balance for stake: have 0, need 667\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent core/ledger.go:1626                          :: lease_accept: provider account mismatch\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent core/ledger.go:1318                          :: multisig_update: account is not multisig\r\n    retryable_accept_loop_test.go:344: [ok] retryable=false want=false kind=permanent store/mem_store.go:296                       :: CommitBlock: lease state conflict: lease 4f3a2b1c is accepted, want created\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=transient core/retryable.go:11                         :: previous block not found\r\n    retryable_accept_loop_test.go:344: [ok] retryable=true  want=true  kind=transient core/retryable.go:12                         :: source send not pending: 4f3a2b1c\r\n    retryable_accept_loop_test.go:364: SIBLING MESSAGES: same store guard, same permanent condition, different wording:\r\n    retryable_accept_loop_test.go:365:   retryable=true   :: CommitBlock: lease state conflict: lease 4f3a2b1c not found\r\n    retryable_accept_loop_test.go:366:   retryable=false  :: CommitBlock: lease state conflict: lease 4f3a2b1c is accepted, want created\r\nCLASSIFIER CONFIRMED: permanent lease failures are retryable iff the message contains \"not found\"\r\n--- PASS: TestRetryableClassifierIsLexicalNotSemantic (0.00s)\r\n=== RUN   TestProviderAcceptPermanentNotFoundEntersUnboundedRetryLoop\r\n2026/11/05 16:55:13 Genesis block applied: 42000000000000 XE to 378d0f5c2063...\r\n    retryable_accept_loop_test.go:391: STEP 1: lease record absent, pending send present - the provider keeps re-driving the accept\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease e7b68ecd1240..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease e7b68ecd1240... (user=xe-9e41c71e)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 974cdb8ab595...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease e7b68ecd1240 not found\r\n2026/11/05 16:55:13 VM torn down for lease e7b68ecd1240...\r\n2026/11/05 16:55:13 Lease e7b68ecd1240...: retrying accept in 5s\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease e7b68ecd1240..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease e7b68ecd1240... (user=xe-e6d794f7)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 974cdb8ab595...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease e7b68ecd1240 not found\r\n2026/11/05 16:55:13 VM torn down for lease e7b68ecd1240...\r\n2026/11/05 16:55:13 Lease e7b68ecd1240...: retrying accept in 20s\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease e7b68ecd1240..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease e7b68ecd1240... (user=xe-90d2c7d7)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 974cdb8ab595...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease e7b68ecd1240 not found\r\n2026/11/05 16:55:13 VM torn down for lease e7b68ecd1240...\r\n2026/11/05 16:55:13 Lease e7b68ecd1240...: retrying accept in 40s\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease e7b68ecd1240..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease e7b68ecd1240... (user=xe-99a844da)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 974cdb8ab595...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease e7b68ecd1240 not found\r\n2026/11/05 16:55:13 VM torn down for lease e7b68ecd1240...\r\n2026/11/05 16:55:13 Lease e7b68ecd1240...: retrying accept in 1m20s\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease e7b68ecd1240..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease e7b68ecd1240... (user=xe-ec08425d)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 974cdb8ab595...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease e7b68ecd1240 not found\r\n2026/11/05 16:55:13 VM torn down for lease e7b68ecd1240...\r\n2026/11/05 16:55:13 Lease e7b68ecd1240...: retrying accept in 2m40s\r\n    retryable_accept_loop_test.go:404: STEP 2: 5 retries -> 5 VM provisions and 5 VM teardowns (the tenant VM is destroyed and re-created every cycle)\r\n    retryable_accept_loop_test.go:421: STEP 3: acceptSchedule: done=false failures=5 next-delay=2m40s (saturated at acceptRetryMax=2m40s)\r\n    retryable_accept_loop_test.go:423:         acceptSchedule.due() stays true forever: the scheduler has no termination condition other than the lease ceasing to be pending\r\n    retryable_accept_loop_test.go:430: STEP 4: the provider's chain holds no lease_accept - the accept never lands, so the lease is never served\r\nPROVIDER LOOP CONFIRMED: a permanent \"not found\" rejection destroys and re-creates the tenant VM on every retry, without bound\r\n--- PASS: TestProviderAcceptPermanentNotFoundEntersUnboundedRetryLoop (0.01s)\r\n=== RUN   TestProviderAcceptPermanentNonNotFoundStopsAfterOneAttempt\r\n2026/11/05 16:55:13 Genesis block applied: 42000000000000 XE to 378d0f5c2063...\r\n    retryable_accept_loop_test.go:453: STEP 1: same state as the unbounded-loop case - lease record absent, pending send present\r\n    retryable_accept_loop_test.go:485: STEP 2: production rejection: lease_accept attestation: only 0 valid attestations from trusted timekeepers, need 1\r\n    retryable_accept_loop_test.go:486:         core.IsRetryableError(err) = false (no \"not found\" in the text)\r\n2026/11/05 16:55:13 Lease watch: found unaccepted lease 73d3eb675256..., auto-accepting\r\n2026/11/05 16:55:13 VM provisioned for lease 73d3eb675256... (user=xe-8fb40172)\r\n2026/11/05 16:55:13 Could not find consumer peer for account d0369e97f6fb...\r\n2026/11/05 16:55:13 Failed to add lease_accept: lease_accept attestation: only 0 valid attestations from trusted timekeepers, need 1\r\n2026/11/05 16:55:13 VM torn down for lease 73d3eb675256...\r\n    retryable_accept_loop_test.go:499: STEP 3: 5 lease-watch ticks -> 1 VM provision, 1 VM teardown (the scheduler gave up after the first attempt)\r\n    retryable_accept_loop_test.go:509: STEP 4: acceptSchedule: done=true failures=0 - the lease is never retried\r\nCONTRAST CONFIRMED: the same node state and the same accept path, with a rejection that does not contain \"not found\", is retried exactly once\r\n--- PASS: TestProviderAcceptPermanentNonNotFoundStopsAfterOneAttempt (0.00s)\r\n=== RUN   TestLeaseOpenUnwindMakesProviderAcceptFailWithNotFound\r\n2026/11/05 16:55:13 Genesis block applied: 42000000000000 XE to 378d0f5c2063...\r\n    retryable_accept_loop_test.go:529: STEP 1: provider holds the lease record (state=accepted) and its lease_accept is on its own chain\r\n    retryable_accept_loop_test.go:548: STEP 2: production unwind DELETED the shared lease record\r\n    retryable_accept_loop_test.go:562: STEP 3: production rejection: CommitBlock: CommitBlock: lease state conflict: lease 043b36f82fc8 not found\r\n    retryable_accept_loop_test.go:563:         core.IsRetryableError(err) = true  (the bare \"not found\" substring at core/retryable.go:13)\r\n2026/11/05 16:55:13 VM provisioned for lease 043b36f82fc8... (user=xe-be94d3a5)\r\n2026/11/05 16:55:13 Could not find consumer peer for account 5d5347f45b1b...\r\n2026/11/05 16:55:13 Failed to add lease_accept: CommitBlock: CommitBlock: lease state conflict: lease 043b36f82fc8 not found\r\n2026/11/05 16:55:13 VM torn down for lease 043b36f82fc8...\r\n2026/11/05 16:55:13 Lease 043b36f82fc8...: retrying accept in 5s\r\n    retryable_accept_loop_test.go:581: STEP 4: the provider provisioned a VM and then TORE IT DOWN; acceptSchedule done=false failures=1\r\n    retryable_accept_loop_test.go:589: NOTE: the same unwind also removed the lease's pending send (core/rollback.go:222), so on THIS node the lease-watch tick stops re-driving the lease\r\n    retryable_accept_loop_test.go:590:       the unbounded cycle needs the lease to stay pending while its record is gone\r\nPRODUCTION PATH CONFIRMED: the lease_open unwind makes the provider's accept fail with \"not found\", which the classifier calls retryable\r\n--- PASS: TestLeaseOpenUnwindMakesProviderAcceptFailWithNotFound (0.00s)\r\nPASS\r\nok  \tgithub.com/xeprotocol/xe/node\t0.299s\r\n```\r\n\r\n### What each test establishes\r\n\r\n| test | what it shows |\r\n|---|---|\r\n| `TestRetryableClassifierIsLexicalNotSemantic` | 22 production error strings, 22 documented expectations, all holding. 14 permanent messages are classified retryable because they contain `\"not found\"`; 6 permanent messages without it are correctly non-retryable; the 2 genuinely transient ones are retryable. The decisive pair comes from **one** production guard (`store/mem_store.go:290-303`): `... lease <hash> not found` → retryable, `... lease <hash> is accepted, want created` → not retryable. |\r\n| `TestProviderAcceptPermanentNotFoundEntersUnboundedRetryLoop` | The provider's production loop with the lease record absent and the pending send present: 5 lease-watch ticks → **5 VM provisions and 5 VM teardowns**, `acceptSchedule.done=false`, `failures=5`, the retry delay saturated at `acceptRetryMax` (2m40s), and **no `lease_accept` on the provider's chain** — the accept never lands. |\r\n| `TestProviderAcceptPermanentNonNotFoundStopsAfterOneAttempt` | The **same node-visible state** (lease record absent, pending send present) and the **same accept path**, with a rejection whose text does not contain `\"not found\"`: 5 lease-watch ticks → **1 VM provision, 1 VM teardown**, `acceptSchedule.done=true` — the lease is never retried. The only difference between the two runs is the wording of the rejection, which is the only thing `core.IsRetryableError` looks at. |\r\n| `TestLeaseOpenUnwindMakesProviderAcceptFailWithNotFound` | The production unwind really produces the rejection: `Ledger.SwapBlock` over a `lease_open` deletes the shared lease record; the provider's accept is then rejected with `CommitBlock: CommitBlock: lease state conflict: lease 571b9fce8262 not found`; `core.IsRetryableError(err) = true`; the node provisions a VM and then **tears it down**, `done=false failures=1` — i.e. the first cycle of the unbounded loop. The test also prints the honest bound: the same unwind removed the lease's pending send (`core/rollback.go:222`), so on *that* node the lease-watch stops re-driving the lease. |\r\n\r\n### Reproducibility matrix\r\n\r\nThe same PoC was run unchanged on three trees, all green:\r\n\r\n| tree | result |\r\n|---|---|\r\n| `master` @ `02e9641` | PASS (`-count=1` and `-count=3`) |\r\n| `master` + PR #147 diff (`xe-pr147-master`) | PASS (repo packages build; `go test ./node/` green) |\r\n| PR #147 head (`xe-pr147`) | PASS (repo packages build; `go test ./node/` green) |\r\n\r\n`go vet ./node/` is clean. The full `go test ./node/` package suite passes on `master` with the PoC present.\r\n\r\n## Reachability, and the honest bound on it\r\n\r\nThe loop demonstrated above requires two things at the same time: **the lease's pending send outlives the lease record** (so the 5-second lease-watch keeps re-driving the accept) **and the rejection's text contains `\"not found\"`** (so the classifier says \"retry again\").\r\n\r\n**What the code does today.** The lease record and the pending send are created in **one atomic commit** — `core/ledger.go:1584-1604` sets `commit.PutLease` and `commit.AddPending` together, so a node never has one without the other. The **only** code in the tree that deletes a lease record is the unwind of a `lease_open`:\r\n\r\n```go\r\n// core/rollback.go:220-223\r\ncase BlockLease:\r\n\tdeletePendingID = b.Hash      // 222: the lease's pending send\r\n\tdeleteLeaseHash = b.Hash      // 223: the lease record\r\n```\r\n\r\nand both are applied in the same store transaction (`store/mem_store.go:219-230` and `:256-258`; `store/badger_store.go:1101-1105`). **So on current master a single node does not reach \"record gone, payment still pending\" by itself** — the one deletion that removes the record removes the pending send with it.\r\n\r\n**Therefore:** the PoC injects that combination at the store boundary, using the store's own test-only helper `MemStore.DropLeaseForTesting` (`store/mem_store.go:704-708`), and lets the production code react to it. It is the only artificial step in the harness: `autoAcceptLease`, `leaseWatchTick`, `acceptSchedule`, `acceptRetryDelay`, `core.Ledger`, `store.MemStore` and `core.IsRetryableError` are all the production implementations, and nothing about the *reaction* is simulated.\r\n\r\n**What is live on master today, without any injection:**\r\n\r\n1. **The classification defect itself, for all five consumers.** 14 permanent errors are classified retryable, on the API contract (`api/handler.go:413`), the quorum promotion path (`core/quorum.go:328`), the quorum winner append (`core/quorum.go:387`), the sync apply loop (`net/sync.go:609`) and the provider accept path (`node/node.go:1617`). Those other consumers are already reported elsewhere (see the dedup section); **this report's subject is the fifth one, the only consumer whose misclassification destroys a machine.**\r\n2. **The provider's destroy-then-retry handler is unconditional.** `node/node.go:1615-1617` destroys the tenant's VM for *any* failed accept and then asks the classifier whether to try again. It does not look at *why* the accept failed.\r\n3. **The scheduler is unbounded.** `acceptSchedule.record` has no attempt cap and no permanent-failure exit (`node/node.go:1726-1745`), so any retryable verdict — from any cause — becomes an endless destroy/re-create cycle with a 160-second saturated backoff.\r\n4. **A reachable route to a `\"not found\"` rejection of the accept exists, although on its own it is bounded.** The provider's own certificate check is at `node/node.go:1503`; the ledger's is at `core/ledger.go:1690`. The window between them contains the entire VM provisioning (`node/node.go:1554` → `node/vm.go:118-142`, which waits up to two minutes for the SSH port on Lima) and the PoW solve. If the pinned certificate is evicted from the provider's certificate cache in that window (`node/certset.go:25-53` keeps 256 certificates per provider and evicts the oldest), the ledger rejects with `lease_accept: certificate not found: <hash>` — retryable → destroy + retry. On the *next* attempt the node's own check fails first (\"pinned certificate <hash> not held\", `node/perf.go:428-430`), the node gives up and the lease is marked done, so this route produces a bounded one- or two-cycle churn rather than an endless loop. I state that explicitly rather than overclaiming it.\r\n\r\n**Summary of the bound:** the *unbounded* cycle is demonstrated, and it is the direct consequence of the production code's reaction to a misclassified rejection; but on current master the specific state it needs (record gone, payment pending) is not produced by a single-node transition. The defect is one store-level divergence away from live, and the node has no defence against it: no attempt cap, no permanent-failure detection, and a handler that destroys the tenant's machine before asking whether the failure was permanent.\r\n\r\n## Impact\r\n\r\n- **The tenant's lease is never served.** The `lease_accept` never lands, so the lease stays in state `created` and the provider never serves it. This is not a \"free VM for the tenant\": the machine is destroyed on every attempt.\r\n- **The provider pays for a full VM lifecycle per attempt, forever.** With the backoff saturated at 160 s, a stuck lease costs roughly **540 VM create/delete cycles per day**, each of which is a fresh instance boot (Lima waits up to 2 minutes for the SSH port) plus a teardown, for a lease that can never be accepted.\r\n- **The tenant's machine is repeatedly destroyed and replaced.** Every cycle deletes the instance the provider just built (and may have just announced to the tenant, `node/vm.go:89-102`) and builds a new one. Anything the tenant had on the machine is lost, and the machine the tenant finally gets is not the machine it was last told about.\r\n- **The provider's advertised capacity is charged during the window.** `activeLeaseCount` is `len(n.VMManager.List())` (`node/node.go:1429-1434`), so the transiently-provisioned VM is counted against the provider's capacity and can make `autoAcceptLease` refuse *other*, legitimate leases with `insufficient resources` (`node/node.go:1533-1543`).\r\n- **The provider's node is stuck in a hot loop** (a full VM lifecycle every 160 s per stuck lease) with no operator-visible signal beyond a log line, and no cap on how many leases can be in that state.\r\n- **The trigger is inside the node's own control.** The provider does not choose to destroy the machine; a substring match in `core/retryable.go` does.\r\n\r\n## Honest bounds (what is *not* claimed)\r\n\r\n- **No fund loss, no escrow loss, no stake burn.** The accept never lands in any of these scenarios, so no stake is locked and no escrow is consumed. (`LeaseStakeDivisor` is `const uint64(0)` on `master`, so `LeaseStake(cost)` is 0 anyway — there is no stake to burn.)\r\n- **No double-accept.** The store's CAS rejects a second accept for the same lease (`store/mem_store.go:290-303`), and `autoAcceptLease` returns early when the lease is already accepted (`node/node.go:1467`).\r\n- **Not a consensus fork and not a ledger divergence.** The provider's chain is unchanged by the loop; no block is committed, no balance moves, no vote is cast. This is a node-level resource/availability failure, not a disagreement about ledger state.\r\n- **The unbounded cycle needs the injected store-level divergence.** See \"Reachability, and the honest bound on it\": on current master the only lease-record deletion also removes the lease's pending send, so a single node does not produce that state by itself. I claim the reaction, the unbounded scheduler and the classifier defect; I do **not** claim that a specific single-node transition on current master triggers the endless cycle unaided.\r\n- **The tenant-notification consequence is a source reading, not a PoC result.** The harness has no network, so the `vm_credentials` delivery (`node/vm.go:89-102`) is not exercised; the destruction/re-creation counts are.\r\n- **The certificate-eviction route is bounded.** It produces a one- or two-cycle churn, not an endless loop, because the node's own certificate check fails on the following attempt.\r\n- **Not the API contract.** The `writeSubmitError` consumer's wrong 503-vs-400 is **XE-0014** (accepted, Medium); this report does not re-argue it.\r\n- **Not the sync storm.** The `net/sync.go:609` consumer's \"lease not found\" retry storm is **XE-0035** (accepted, minor).\r\n- **Not the quorum consumers.** The quarantine bypass at `core/quorum.go:328` is **XE-0583** (T9). The swallow-and-drop at `core/quorum.go:387` is *not* claimed here — it is noted as an unexplored adjacent consumer.\r\n- **Not XE-0615 (mine).** XE-0615 is the *opposite* failure: the node **never** tears down a VM whose lease record was deleted. This report is about the node tearing the VM down and rebuilding it in a loop.\r\n- **Not profitable, not remotely triggerable.** The state requires the lease's own consumer and provider; a third party cannot force it. No DoS-amplification claim is made.\r\n- **Scope of the PoC.** One consumer, one provider, one lease, `store.MemStore`, `vm.MockManager`. Multi-lease and multi-provider interactions were not simulated, and the Badger store was not exercised for this finding.\r\n\r\n## Suggested fix direction\r\n\r\n1. **Classify on error identity, not on error text.** The tree already has sentinels (`core.ErrLeaseStateConflict`, `ErrWinnerFullValidation`, `ErrInvalidPoW`, `ErrGap`). The permanent failures should carry a typed error and the five consumers should branch on `errors.Is`. At minimum: remove the bare `\"not found\"` from `core/retryable.go:13` and replace it with the *specific* transient messages it was standing in for — `previous block not found`, `cancel-wins: provider accept not found locally: retry after sync` (already matched by the explicit `retry after sync` pattern at `core/retryable.go:23`), and the `renew-wins:` / `settle-wins:` variants that the open PR #185 adds — and put the permanent lease messages on a non-retryable list. This is the direction the open PR #36 started; it currently adds exactly one entry (`multisig_update: account not found`) and leaves the bare pattern in place. The distinction that matters is *\"the block I depend on has not arrived yet\"* (transient) versus *\"the lease record this operation requires does not exist and never will\"* (permanent) — both are worded with \"not found\" today.\r\n2. **Bound the provider's accept loop independently of the classification.** Give `acceptSchedule` a maximum attempt count and an explicit terminal state for a permanent failure, so that no classification mistake can turn one rejection into an endless destroy/re-create loop. `node/node.go:1726-1745` currently has neither.\r\n3. **Do not destroy the tenant's machine for a failure that will be retried.** The teardown at `node/node.go:1616` happens before the retry decision at `:1617`. For a retryable rejection the provider should re-attempt the accept against the machine it already built; the machine should only be torn down when the lease is dead or the failure is terminal. This also removes the tenant-visible churn (a machine destroyed and rebuilt every 20-160 s).\r\n4. **Do not announce the VM before the accept lands.** `provisionVM` (`node/vm.go:69-103`) sends `vm_credentials` to the consumer, but it runs at `node/node.go:1554`, before the accept is submitted at `:1612`. Announcing a machine the provider may immediately destroy is what converts a retry into a tenant-visible outage. The announcement belongs after the accept is committed.\r\n5. **Treat a missing lease record as an explicit permanent condition** on the provider's accept path, rather than letting the wording of the store's error decide whether the provider loops.\r\n\r\n## Relation to other existing reports (dedup)\r\n\r\nAll **231** public desk tickets were listed and **every ticket body was fetched from its detail endpoint** (`GET /v1/tickets` returns metadata only; bodies are not in the list payload) and swept in full. All **100** open PRs were fetched as diffs (`https://github.com/xeprotocol/xe/pull/N.diff`) and swept for `IsRetryableError`, `retryable.go`, `autoAcceptLease`, `acceptRetry`, `acceptSched`, `teardownVM`, `not found`, `ExpectLease*` and `lease state conflict`.\r\n\r\n**No ticket in the corpus reports this.** The claim-level sweep found:\r\n\r\n- **0** tickets that mention both the classifier (`IsRetryableError` / `core/retryable.go`) **and** the provider accept path (`autoAcceptLease` / `acceptSchedule`);\r\n- **0** tickets that mention both the classifier **and** a VM teardown / re-provision;\r\n- **8** tickets that mention the classifier at all (`XE-0021`, `XE-0040`, `XE-0098`, `XE-0105`, `XE-0268`, `XE-0464`, `XE-0481`, `XE-0583`), and **1** ticket that mentions the bare `\"not found\"` substring (`XE-0583`, mine);\r\n- **5** tickets that mention the provider accept path (`XE-0076`, `XE-0104`, `XE-0114`, `XE-0119`, `XE-0615`), none of which mentions the classifier.\r\n\r\nAdjacent reports, checked and **distinct**:\r\n\r\n- **XE-0014** (reporter 10, accepted, Medium, `node-api`) — *Structurally impossible blocks are rejected with 503 `{retryable:true}` instead of 400 `{retryable:false}`*. This is the **API** consumer (`api/handler.go:413`). Its fix PR **#36** adds a 14-entry `nonRetryablePatterns` allowlist that contains exactly one \"not found\" string (`multisig_update: account not found`) and **does not remove** the bare `\"not found\"` pattern. It makes no claim about the provider's accept path, the VM lifecycle, or the retry scheduler.\r\n- **XE-0035** (reporter 14, accepted, minor, `ops-testnet`) — the **sync** consumer (`net/sync.go:609`): \"lease not found\" blocks retried every cycle. Same root cause, different consumer, no VM impact.\r\n- **XE-0098** (reporter 32) — sync quarantine poisoning (`core/quorum.go:328`'s sibling path, `net/sync.go`). **XE-0268** (reporter 121, triaging) — the sync 10-pass discard. Both bodies contain **zero** mentions of `node.go`, `autoAcceptLease`, `acceptSched`, `teardownVM` or `provisionVM`.\r\n- **XE-0583** (reporter 210, mine, `new`, `consensus`) — its **T9** is the `core/quorum.go:328` consumer of the *same* classifier defect, and its T10 shows the provider's re-accept of an orphaned lease failing with `lease state conflict: lease <hash> not found`. **XE-0583 contains no mention of `node.go:1617`, `autoAcceptLease`, `acceptSched`, `teardownVM`, `provisionVM`, or of the provider's VM destroy/re-create behaviour** — its subject is the consensus-level consequences of the shared lease record being deleted by a consumer-side unwind. This report's subject is the **node-side** consequence of the classifier verdict: the destroy/re-create loop, the unbounded scheduler, and the tenant-visible churn. The root cause (`core/retryable.go:13`) is shared; the consumer, the code path and the impact are not.\r\n- **XE-0615** (reporter 210, mine, `new`, `node-api`) — the **opposite** failure mode: the node never tears down a VM whose lease record was deleted, so the guest runs forever and its capacity is permanently charged. This report is about the node tearing the VM down and rebuilding it in a loop.\r\n- **XE-0114** (reporter 36) — provider *restart* destroys VMs backing live leases. **XE-0259** (reporter 39) — `Teardown` reports success while the VM lives. **XE-0119** (reporter 39) — resource clamping vs capacity accounting. All three are about VM lifecycle at startup, teardown reporting, or accounting — none is about the accept retry decision or the classifier.\r\n\r\nOpen PRs checked and confirmed **not** to fix this:\r\n\r\n- **PR #36** — adds a `nonRetryablePatterns` allowlist with one entry; the bare `\"not found\"` stays.\r\n- **PR #185** — *adds eight more* retryable substrings to `core/retryable.go` (`renew-wins: … retry after sync` and friends), widening the same matcher.\r\n- **PR #114** — sanitises the API error *text* (`cleanBlockError`) for `writeSubmitError`; it does not change `core.IsRetryableError`'s semantics, the store's `\"lease %s not found\"` message, or the provider's accept path.\r\n- **PR #205** — touches `autoAcceptLease` / `acceptSched` / `teardownVM` only as unchanged context lines; the retry decision and the scheduler are byte-for-byte unchanged.\r\n- **PR #179**, **PR #211**, **PR #227/#232**, **PR #210** — sync nil-guards, vote re-weighting, cascade overlays and pending-index work; none touches the provider's accept retry decision.\r\n\r\n## Artifacts\r\n\r\n- PoC: `node/retryable_accept_loop_test.go` — `TestRetryableClassifierIsLexicalNotSemantic`, `TestProviderAcceptPermanentNotFoundEntersUnboundedRetryLoop`, `TestProviderAcceptPermanentNonNotFoundStopsAfterOneAttempt`, `TestLeaseOpenUnwindMakesProviderAcceptFailWithNotFound`.\r\n- Run log: `acceptloop_test.txt` (the verbatim output above), `acceptloop_test_count3.txt` (`-count=3`), `acceptloop_vet.txt` (`go vet ./node/`, clean), `acceptloop_fullpkg.txt` (full `go test ./node/` package, green).\r\n- Dedup sweep: `dedup_acceptloop.txt` (all 231 ticket bodies fetched from the detail endpoints, the claim-level co-occurrence sweep, the raw keyword sweep, the 100 open-PR diff sweep and the verbatim check of every ticket cited above).\r\n- Base commit: `master` @ `02e9641`.","patch_refs":[],"thread":[{"id":292,"source":"web","source_ref":"reporter:210:26cc1e11e7756d53","author":"xe:79bd7409","team":false,"body":"Cross-reference: the **node-side surface of this ticket is fixed** by the patch posted on XE-0748 (message there, verified green on master `02e9641`).\n\nSpecifically, the accept path in `node/node.go`'s `autoAcceptLease` no longer consults `core.IsRetryableError` at all. It now classifies the `AddBlock` rejection from the **ledger's state**: after the (unchanged) teardown, the exit is terminal iff the lease record is gone or already taken (`n.GetLease`), transient otherwise. The permanent \"not found\" rejection this ticket demonstrates (lease record unwound while the pending send survives) now yields **one** provision and **one** teardown, `done=true` — the destroy/re-create churn is gone, without touching the classifier itself.\n\nRegression coverage in the patch on XE-0748:\n\n- `node/retryable_accept_loop_test.go`, `TestProviderAcceptPermanentNotFoundStopsAfterOneAttempt` — asserts the fixed behavior, and also records that `core.IsRetryableError` **still** classifies the same rejection as retryable, which is precisely why the accept path must not consult it;\n- `node/accept_schedule_abandon_test.go` — the transient-strand side (XE-0748), same patch.\n\n**Still open for this ticket:** the classifier itself is unchanged. Its other consumers — `api/handler.go` `writeSubmitError` (503 vs 400), `core/quorum.go` (x2), `net/sync.go:609` — retain the bare `\"not found\"` misclassification, and `T1` (`TestRetryableClassifierIsLexicalNotSemantic`, 21 cases) still documents it case by case.","created_at":"2026-11-05T15:54:22.440112+00:00"},{"id":531,"source":"desk","source_ref":"reply:257","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0417, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, reply with what differs and we will look again.","created_at":"2026-11-05T22:26:41.168534+00:00"}]}