Skip to content

fix(apps): ignore defaults Slack adds when diffing a manifest - #212

Merged
piekstra merged 2 commits into
mainfrom
fix/apps-diff-defaults
Oct 19, 2026
Merged

piekstra merged 2 commits into
mainfrom
fix/apps-diff-defaults

Conversation

@piekstra

Copy link
Copy Markdown
Member

Slack exports false or empty values for settings a manifest leaves out (oauth_config.pkce_enabled, settings.app_level_token_rotation_enabled, settings.is_mcp_enabled). An app created from a hand-written manifest therefore never diffed clean against that file, so slck apps diff exited 1 right after slck apps create.

A key present on only one side whose value is false, an empty string, an empty array, null, or an object of only those, is no longer reported. A one-sided key with any other value still is.

Verification

  • go test ./internal/cmd/apps/ with a new export fixture carrying those defaults plus one enabled live-only setting: the defaults are ignored and the enabled setting is still listed.
  • Against a real workspace with a local build: apps create from a minimal manifest, then apps diff exits 0 (the released build exits 1 listing the three defaults), then apps delete --force. Three existing apps still diff clean against their exported manifests.

Slack exports false or empty values for settings a manifest leaves out
(pkce_enabled, app_level_token_rotation_enabled, is_mcp_enabled), so an
app created from a file never diffed clean against that file. A key on
one side only with a default value is no longer a difference.
@piekstra
piekstra marked this pull request as ready for review October 19, 2026 16:12

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 8685cbd028b6
Profile: claude-monit-reviewer - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 1
harness-engineering:repo-health 0
policies:conventions 0
go:implementation-tests (1 finding)

Minor - internal/cmd/apps/diff.go:75

isDefault has five branches (nil, bool, string, []any, map[string]any-recursive) but the added test (TestDiffIgnoresDefaultsTheFileLeavesOut) only exercises the bool-false branch through the fixture; nil, empty string, empty array, and the recursive object-of-only-defaults case are untested. The map branch is the least obvious part of the fix (a whole nested object is swallowed only if every leaf under it is itself a default), so a regression there (e.g. an empty map incorrectly treated as default, or a map with one non-default leaf leaking through) would pass CI unnoticed. Add a couple of cases to the fixture (or a direct table test of isDefault) covering an empty-string/empty-array one-sided key and a one-sided object whose children are all defaults vs. not.

Reviewer Coverage

  • go:implementation-tests — complete (broad); inspected 2 assigned files (4 inspected across reviewers): internal/cmd/apps/apps_test.go, internal/cmd/apps/diff.go; skipped: none; constraints: none
  • harness-engineering:repo-health — complete (constrained); inspected 3 assigned files (4 inspected across reviewers): internal/cmd/apps/apps_test.go, internal/cmd/apps/diff.go, internal/cmd/apps/testdata/manifest-export-with-defaults.json; skipped: none; constraints: none
  • policies:conventions — complete (broad); inspected 2 assigned files (4 inspected across reviewers): README.md, internal/cmd/apps/diff.go; skipped: none; constraints: No sibling ../cli-common/docs or ../.github convenience copies were present, so shared Open CLI Collective policy text could not be checked directly; nothing in the diff indicated it duplicates shared policy.
Inspected files (4)
  • README.md
  • internal/cmd/apps/apps_test.go
  • internal/cmd/apps/diff.go
  • internal/cmd/apps/testdata/manifest-export-with-defaults.json

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 2m 06s | ~$1.26 (est.) | claude-sonnet-5 | cr 0.10.319
Field Value
Model claude-sonnet-5
Reviewers go:implementation-tests, harness-engineering:repo-health, policies:conventions
Engine claude_cli · claude-sonnet-5
Reviewed by cr · monit-reviewer
Duration 2m 06s wall · 3m 42s compute
Cost ~$1.26 (est.)
Pricing basis anthropic-public-2026-09-23
Tokens 46 in / 12.2k out

Per-workstream usage

  • orchestrator-selection — claude-sonnet-5
    • In: 6
    • Out: 2.5k
    • Cache read: 93.7k
    • Cache create: 39.9k
    • Cost: ~$0.20 (est.)
    • Duration: 29s
  • go:implementation-tests — claude-sonnet-5
    • In: 10
    • Out: 4.0k
    • Cache read: 218.2k
    • Cache create: 59.2k
    • Cost: ~$0.32 (est.)
    • Duration: 1m 09s
  • harness-engineering:repo-health — claude-sonnet-5
    • In: 12
    • Out: 3.6k
    • Cache read: 268.6k
    • Cache create: 53.9k
    • Cost: ~$0.30 (est.)
    • Duration: 1m 08s
  • policies:conventions — claude-sonnet-5
    • In: 12
    • Out: 1.8k
    • Cache read: 258.7k
    • Cache create: 49.7k
    • Cost: ~$0.27 (est.)
    • Duration: 43s
  • orchestrator-rollup — claude-sonnet-5
    • In: 6
    • Out: 418
    • Cache read: 147.4k
    • Cache create: 31.8k
    • Cost: ~$0.16 (est.)
    • Duration: 11s

Comment thread internal/cmd/apps/diff.go
@piekstra
piekstra merged commit 5ff747b into main Oct 19, 2026
9 checks passed
@piekstra
piekstra deleted the fix/apps-diff-defaults branch October 19, 2026 16:56
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.

2 participants