Derive special-mailbox paths from the Envelope Index — remove the vacuous walk (Refs #315) - #331
Merged
Merged
Conversation
…e vacuous AppleScript walk The #268 container walk enumerated children of the app-level UNIFIED container; those references have a non-mailbox container on the first probe, so the climb never executed and the walk succeeded vacuously — emitting the leaf as the full path. Live: 4/5 types wrong on all 7 accounts, and neither documented fail-safe fired because nothing failed; the wrong value was wire-indistinguishable from a correct top-level result (the #315 diagnosis's third failure mode the design never anticipated). Approach (b) from the diagnosis: AppleScript keeps what it is uniquely good for (leaf + special-type identification via the unified containers); the full path is joined at the Server layer from the account's Envelope-Index mailbox paths — MailboxURL.mailboxPath, the exact representation search_emails returns, which was correct all along. joinSpecialMailboxPath is pure and honest by construction: exactly one candidate (== leaf or ends in /leaf) wins; zero (no index / EWS / unknown leaf) or 2+ (ambiguous leaf) omit the key while the leaf stays present — the observable absent-path signal #268 promised but never delivered. Server.swift's description walks back the 'compare full-path directly instead of a leaf-suffix heuristic' advice that steered consumers into the silent wrong answer; it now states the omission contract plainly (per the #318 deferred-live-verification rule: caveats live where consumers read). Tests: walk-PINNING builder tests are replaced by walk-ABSENCE tests (the walk must not quietly return); leaf guards' survival pinned; pure join covered for nested / top-level / ambiguous / unknown / boundary / no-index cases. Plan-tier note: implemented under unattended /idd-all — Plan deliberation skipped per orchestrator contract, marked here. 1073 tests, 0 failures. Refs #315
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #315
Summary
The #268 AppleScript container walk could never work: unified-container references have a non-mailbox
containeron first probe, so it succeeded vacuously and returned leaf-for-nested — 4/5 types wrong on all 7 live accounts, with both documented fail-safes structurally unreachable. This lands the diagnosis's approach (b): AppleScript identifies leaves; the Server layer joins them against the account's Envelope-Index paths (MailboxURL.mailboxPath, the same representationsearch_emailsreturns). Zero/ambiguous candidates →_pathhonestly omitted (leaf stays). The tool description drops its refuted "no leaf-suffix heuristic needed" advice and states the omission contract (per the #318 rule).Verification
垃圾桶≠大垃圾桶).blocked-on-setup) before /idd-close. Codex lens unavailable (quota) — Claude verify round deferred to the batch's verify backlog.Coordination
Server.swiftalso touched by #314's PR (different regions) and #307 (line 17).MailController.swiftshares the file with #314/#307 — separate regions. Textual-adjacency conflicts only.🤖 Generated by /idd-all. Do NOT add a GitHub close trailer — run /idd-close after merge.