Repository navigation
test: smoke-test unreadable address books and cards under foreign filenames - #8
Merged
Merged
Conversation
…enames list-contacts must report an error when the address book cannot be read, not an empty list that tells the agent there are no contacts. PR #3 would have regressed this without any test noticing. Cards written by other clients need not live at <uid>.vcf. Seed one under an unrelated filename over CardDAV and drive get/update/delete by uid, so resolveContact's address-book scan runs end to end and updates are checked to land on the card's own href. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under tsx on Node 22 (CI), importing tsdav's named exports from the smoke script fails: "The requested module 'tsdav' does not provide an export named 'DAVClient'". The seed only needs PUT, GET and DELETE, so plain fetch with Basic auth does it without depending on how tsx loads tsdav's bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds two end-to-end checks to
scripts/smoke.ts. CI already runs it against Radicale on every PR.1. A missing address book must produce an error, not an empty list.
list-contactsis called with a URL that doesn't exist, and the test assertsisError. Returning[]would tell the agent the address book has no contacts. #3 regresses exactly this: a PROPFIND 404 gets filtered out like the collection's own entry, so the tool returns[]. This check catches it.2. Cards that aren't stored as
<uid>.vcf.The smoke test only ever created cards through
create-contact, soresolveContact's fallback scan never ran end to end. The test now writes a card under an unrelated filename with a plain HTTP PUT, as another client would. It then runsget-contact,update-contactanddelete-contacton it by uid. After the update it checks that the change landed on the card's own href and not in a new<uid>.vcf. If a step fails, the seeded card is removed so no test data is left behind.Verification
npm run validatepasses.tsdav does not provide an export named 'DAVClient', so the script now uses plainfetch.maincode): passese18b02e): fails withlist-contacts on a missing address book: expected a tool error, got result: [].envserver orsmoke:agent: no.envwas available in this checkout.🤖 Generated with Claude Code