Skip to content

Sync default verbs in config with connector hardcoded list#36

Open
btipling wants to merge 1 commit into
mainfrom
bt/sync-default-verbs
Open

Sync default verbs in config with connector hardcoded list#36
btipling wants to merge 1 commit into
mainfrom
bt/sync-default-verbs

Conversation

@btipling

Copy link
Copy Markdown
Contributor

Summary

  • pkg/config/config.go defaultVerbs was missing archive and update, which are both present in the connector's defaultVerbs in pkg/connector/connector.go (used by filterArgs to validate/expand input). Adding them so the advertised config default matches the set the connector will actually accept.
  • Regenerated config_schema.json to reflect the new default.

Test plan

  • go vet ./...
  • go test ./...
  • make lint
  • go build ./...

🤖 Generated with Claude Code

The config package's defaultVerbs was missing "archive" and "update",
which are present in the connector's filterArgs default list. Align the
two so the schema default matches what the connector will actually
accept and use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@btipling
btipling requested a review from a team April 24, 2026 15:55
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @btipling's task in 1m 15s —— View job


PR Review: Sync default verbs in config with connector hardcoded list

  • Gather context and read changed files
  • Review changes
  • Post review feedback

Verdict: Looks good

The change is correct and well-scoped. The config's defaultVerbs in pkg/config/config.go was missing archive and update, which are both present in the connector's authoritative defaultVerbs in pkg/connector/connector.go:67-76. Since filterArgs() (connector.go:78) validates user-supplied verbs against the connector's list, the mismatch meant that when a user relied on the config defaults, they were getting a narrower set of verbs than the connector actually supports — archive and update entitlements would never be synced unless explicitly specified.

Both additions are alphabetically ordered, consistent with the existing style. The regenerated config_schema.json matches the updated defaults.

One observation (not blocking)

There's a similar discrepancy with defaultNouns:

  • Config (pkg/config/config.go:8-10): ["space"]
  • Connector (pkg/connector/connector.go:59-65): ["attachment", "blogpost", "comment", "page", "space"]

This might be intentional (only sync space-level nouns by default, requiring users to opt in for more granular types like page, blogpost, etc.), but worth confirming it's by design and not the same drift that happened with verbs.

Architectural note

Having two separate defaultVerbs/defaultNouns variables in two different packages (config vs connector) creates the exact class of bug this PR fixes. A future improvement could be to have the config package import the canonical list from the connector (or a shared package) so they can't diverge again. Not something for this PR to tackle though.


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