Repository navigation
feat(connections): TickTick on Crew-owned OAuth (DCR), served to expiry without refresh - #34213
Conversation
c938ff7 to
47e2914
Compare
…ry without refresh
47e2914 to
799d38b
Compare
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this adds one slug to an existing seam, and the no-refresh expiry change is limited to pairs without a refresh token, as the description says. Notes
[DESIGN-REVIEWED] 799d38b Description read[DESCRIPTION-READ] af068960d363997d9491a6b3e104a12526331c9c356596236e7cfb902bb87191 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. TickTick goes behind the Notes
What this change shipsInventory (4 items) — 3 justifiedIntent: let bridged-harness chats use TickTick through Crew-held OAuth when the preview is on. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 799d38b Description read[DESCRIPTION-READ] 2327dae9c8e415f0b0849f29f319489f3c040cb8657ee322f67c74cc9e300b25 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Dispositions for the two advisory notes on First Principles, item 2 (revert the no-refresh skew in Design note (an unused expired card keeps reading Connected until the next call): accepted as a known limit, not fixed here. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head the review checked that ticktick joins DCR_SLUGS and so runs through the same routing, refresh, revoke and SUPPORTED_SLUGS seams as the six existing DCR cards, with no TickTick-specific path. The review ran the 15 test files that cover crew_oauth at this head (734 passed). It then mutated each production hunk: dropping the expiry delete, putting the skew back for no-refresh pairs, and removing the slug each turn a new test red. The spec and configuration docs are updated in the same commit.
Done well: the expiry drop is a revision-guarded delete_if inside the existing per-slug refresh lock. It keeps the registered DCR client, and the tests drive it on the injected ManualClock with the boundary set exactly at expiry.
Security: the consent URL is already on the exfil OAuth allowlist on main, and the registry entry already has dcr, pkce and launch_gate_passed set. Every pair with a refresh token still uses the 120 s skew, so its behaviour does not change. The only new vault write is the deletion of an expired no-refresh pair. That deletion is revision-guarded, so a concurrent sign-in is never removed. Revoke sends the token only to the vendor's own authorization server. All of this sits behind the off-by-default crew_oauth preview.
Optional:
- Add a test for an unexpired TickTick pair with
access_token("ticktick", force=True). It should assertneeds_auth, assert the pair is still held, and assert no token call was made. Today the review can make the_refreshdelete unconditional and every test stays green, so nothing checks the body's claim that a vendor 401 before expiry keeps the pair. - In connections.md near line 1364, say the pair is dropped "on the first call after expiry". An expired card that nobody calls still reads Connected until then. Also, the drop only happens if TickTick's token answer carries
expires_in, and no live sign-in has checked that yet. - The docstring at test_crew_oauth_dcr.py:631 still says "six" live authorize endpoints. The list now has seven.
Problem / Motivation
Goal: With the Crew sign-in feature preview on, a chat on a bridged harness (every harness except kiro-cli) can use the TickTick Connection through Crew-owned OAuth, on the same generic DCR engine the six DCR cards use (#33077). TickTick's launch gate passed in #30763 and its registry entry already says
dcr: true,pkce: true. This is RFCrfc-crew-owned-oauth.mdstep 4c ("launch-gated DCR cards, each as its launch gate passes").Why it matters
Without Crew custody TickTick only works where the harness runs its own DCR sign-in. kiro-cli does; most other harnesses do not.
Not a goal
serves_backendnever bridges kiro-cli).Live discovery (curl, 2026-11-09 23:40Z, no sign-in)
POST https://mcp.ticktick.comunauthenticatedWWW-Authenticate: Bearer ... resource_metadata="https://mcp.ticktick.com/.well-known/oauth-protected-resource"authorization_servers: ["https://ticktick.com/"],scopes_supported: [tasks:write, tasks:read]https://ticktick.com/.well-known/oauth-authorization-server(RFC 8414)https://ticktick.com(= committedl0_expectations.authorization_server),registration_endpoint https://api.ticktick.com/oauth/register,code_challenge_methods_supported [plain, S256],token_endpoint_auth_methods_supported [none, client_secret_basic],authorization_response_iss_parameter_supported: true,grant_types_supported: [authorization_code],revocation_endpoint https://api.ticktick.com/oauth/token(the token URL)POST /oauth/register,token_endpoint_auth_method: none, loopback redirectgrant_types [refresh_token, authorization_code]authorization_code; the real grant walked in #30763 step 8 hadexpires_in: 15551999(180 days) and norefresh_tokentoken,token_type_hint,client_id) to the advertisedrevocation_endpointWhat changed (motivation → approach → change)
crew_oauth.DCR_SLUGSgainsticktick. The engine needs no provider data: endpoints, scopes and auth method come from discovery.Tokens.expiringdrops the 120 s refresh skew for it, since there is nothing to renew early.needs_auth. The card then reads Not connected and offers Connect again; the proxy returns its usual 409needs_auth"reconnect it on the Connections page". The registered client is kept, so reconnecting adds no new client. A forced call (vendor 401) before expiry still answersneeds_authand keeps the pair, as today.upstreamRevoked: false, deletes locally and keeps the card's manual revoke link (Settings → Integrations → kiro → UnLink). No special case: Notion and Linear also advertise their token URL asrevocation_endpointand do revoke there, so a generic "skip when equal" rule would break them.docs/system-specs/modules/connections.md(seven DCR cards, TickTick's no-refresh and revoke behaviour) andsrc/kiro_crew/docs/configuration.md(card list).Per-OS before / after
127.0.0.1:48100, same as the six DCR cardsManual test (owner)
Settings > Feature previews: turn on Crew sign-in; chats on a bridged harness.
list_projects(orticktick_list_projects). Expect a result, no second sign-in.Backwards compatibility
Compatible. Preview off or kiro-cli: nothing changes. The skew change only touches pairs with no refresh token. The six DCR cards and GitHub, Asana, Google normally store a refresh token, so their timing is unchanged. A stored pair with no refresh token and a recorded expiry is now used for its last 120 s instead of answering
needs_auth, and is deleted once expired instead of staying as an unusable "Connected" entry.Tests
test/test_crew_oauth_dcr.py:test_a_ticktick_grant_without_refresh_is_served_to_its_expiry: 60 s before expiry the access token is served and the token endpoint is never called (fails without the skew change).test_an_expired_ticktick_grant_is_needs_auth_and_reads_not_connected: at expiryneeds_auth, no token call,holds_grantFalse, client kept (fails without the delete).test_a_ticktick_disconnect_whose_revoke_is_refused_deletes_locally: revoke answered 401 →{"removed": True, "revoked": False}.authorization_endpointadded to the banner-gate parametrize.Local:
test_crew_oauth_dcr.py,test_crew_oauth_mvp_flows.py,test_crew_oauth_mvp.py,test_crew_oauth_google_asana.py,test_connections_disconnect_crew_oauth.py,test_configuration_doc_facts.py: all pass.Known limit: a real sign-in and tool call on the bridged path were not run here (no TickTick account in this run); the manual test above covers it.