Skip to content

feat(adapter): Basecamp 4 adapter with the secret in the path [*] - #6

Merged
schmunk42 merged 6 commits into
masterfrom
feature/basecamp-adapter
Dec 4, 2026
Merged

schmunk42 merged 6 commits into
masterfrom
feature/basecamp-adapter

Conversation

@schmunk42

Copy link
Copy Markdown
Member

Summary

Adds basecamp4 as a second source adapter (disabled by default) and proves that the adapter seam carries a source with another verification, identity and event structure without a change to the intake, the routing or the event resource.

  • Refactoring first (own commit): the path secret check moves into AbstractWebhookParser::verifyPathSecret(); the fixture loader and the matrix building block of the GitLab tests become the source-neutral FixtureSet and FixtureMatrix; FixtureAnonymisationTest takes one definition per source.
  • Adapter Basecamp4Parser: secret as path segment (hash_equals), event type basecamp4.<kind>, dedupe key from the top-level event id (body hash without id or kind), actor creator.id, project recording.bucket.id, filter attributes kind, project_id and recording_type. Only the edit fact is classified (…_title_updated and …_content_updated: yes, …_created: no); system generated, confidential and mention stay unknown. The payload is handed on unchanged and no kind is dropped.
  • Fixtures and matrix: 17 fixtures under tests/Fixtures/basecamp4/ with the expected status and reason in the modes process and handler, for the unit harness and the group database; the sequence runner is shared with GitLab.
  • Log proof: Basecamp4LogTest runs the intake with a recording logger without the redaction processor and asserts that no raw record carries the path secret or payload text; a leaking test adapter proves that the detector bites.
  • README section "Basecamp 4", changelog for 0.2.1.

Built against the documentation, not against captures

No captured Basecamp deliveries were available. The adapter and all fixtures follow the Basecamp API documentation (sections/webhooks.md of basecamp/bc3-api); the fixtures carry the origin documented (…) or derived from …, none is captured, and every value is invented. Open points the documentation does not answer:

  • whether the top-level event id stays the same when Basecamp retries a delivery (the dedupe key assumes it does);
  • the kind kanban_card_moved is not in the documented vocabulary; it is treated like any other kind.

Things to know

  • In the mode process a Basecamp endpoint has no mention gate: every event of an allowed creator that is not an edit and matches a route is routed, including trashed, moved and unknown kinds. The README recommends routes with eventType or a kind filter, or the mode handler.
  • A comment on a card has the comment as target; the card (recording.parent) is only in the payload.

Tests

  • Locally: unit 944 tests, integration without the group database 78 tests, all green.
  • The group database (333 tests, MySQL 8 and PostgreSQL) did not run locally and is verified by the workflow Tests of this pull request.

Not breaking, no migration. Release as 0.2.1 after the merge.

🤖 Generated with Claude Code

schmunk42 and others added 6 commits December 3, 2026 22:58
…et and matrix, anonymisation test per source [*]

No behaviour change, preparation for a second source adapter: the path
secret check of PassthroughPathParser and the sample test adapter moves
into AbstractWebhookParser::verifyPathSecret(); the fixture loader and the
matrix building block of the GitLab tests become FixtureSet and
FixtureMatrix; FixtureAnonymisationTest takes one definition per source.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s event type and the event id as dedupe key [*]

Source basecamp4, disabled by default. Verification through the shared
path secret check; type basecamp4.<kind>; dedupe key from the top-level
event id, the body hash without id or kind; actor from creator.id, project
from recording.bucket.id, target the recording; filter attributes kind,
project_id and recording_type. Only the edit fact is classified
(title/content updated: yes, created: no), all other facts stay unknown.
Built against the Basecamp API documentation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the path secret nor payload text [*]

The intake runs with the real Basecamp4Parser and a recording logger
without any processor, so the proof does not rest on the redaction
processor; a deliberately leaking test adapter proves that the detector
bites.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t modes, sequence runner shared with GitLab [*]

17 fixtures in the documented shape of the Basecamp API (origin
documented or derived, every value invented, none captured), their rows
with the expected status and reason in the modes process and handler for
the unit harness and the database group, and the basecamp4 source of the
anonymisation test. The sequence runner of the GitLab matrix becomes a
shared trait that passes the path secret.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…port, changelog for 0.2.1 [*]

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@schmunk42 schmunk42 self-assigned this Dec 3, 2026
@schmunk42
schmunk42 merged commit b342ff9 into master Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant