Skip to content

fix: isolate sync tests and clarify ignore checks - #248

Merged
pedronauck merged 2 commits into
compozy:mainfrom
antoniofulg:agent/fix-sync-home-and-check-ignore-docs
Jul 17, 2026
Merged

pedronauck merged 2 commits into
compozy:mainfrom
antoniofulg:agent/fix-sync-home-and-check-ignore-docs

Conversation

@antoniofulg

@antoniofulg antoniofulg commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • isolate the sync transport service test from the developer's ambient COMPOZY_HOME
  • document git check-ignore -v --no-index so negation checks work for tracked and untracked decision-log files
  • add a README contract assertion for the index-independent verification command

Root cause

The sync test injected a temporary GlobalDB, but SyncDirect still resolved its database through the ambient COMPOZY_HOME. That made the test read a developer's real database and fail when its schema was newer than the checked-out binary.

The follow-up review on #237 is partially correct: -v can show a matching negation rule for an untracked path, but Git omits already tracked paths unless --no-index is supplied. The updated command is unambiguous in both states.

Verification

  • make verify — PASS
  • frontend lint: 0 warnings, 0 errors
  • golangci-lint: 0 issues
  • Go: 4,875 passed, 4 opt-in skips
  • Playwright: 5 passed

Summary by CodeRabbit

  • Tests
    • Improved validation of durable documentation to ensure index-independent git ignore verification commands are present.
    • Enhanced synchronization service test setup by configuring the home environment variable for more reliable target resolution and branch handling.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 63ffe73c-a4d2-44dd-9f35-50d08a369086

📥 Commits

Reviewing files that changed from the base of the PR and between 78e8caf and d5d84e1.

⛔ Files ignored due to path filters (1)
  • extensions/cy-capture-decisions/README.md is excluded by !**/*.md
📒 Files selected for processing (1)
  • extensions/cy-capture-decisions/packaging/readme_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • extensions/cy-capture-decisions/packaging/readme_test.go

Walkthrough

Two tests are updated: the durability README test verifies index-independent gitignore commands, and the sync transport service test configures its home environment variable from the test environment.

Changes

README Verification

Layer / File(s) Summary
Durability README gitignore assertion
extensions/cy-capture-decisions/packaging/readme_test.go
The test verifies that the durable README section includes verbose, index-independent git check-ignore -v --no-index commands for documented durable paths.

Daemon Test Environment

Layer / File(s) Summary
Sync service test home configuration
internal/daemon/sync_transport_service_test.go
The test setup sets compozyconfig.HomeEnvVar to the test environment’s home directory before service creation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • compozy/compozy#216: Adds the home-resolution logic that this test configures through compozyconfig.HomeEnvVar.
  • compozy/compozy#237: Adds related packaging tests for the README durability gitignore contract.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches both main changes: isolating the sync test and clarifying gitignore verification checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@antoniofulg
antoniofulg marked this pull request as ready for review July 17, 2026 00:51
@greptile-apps

greptile-apps Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR clarifies decision-log ignore checks and isolates sync transport tests from local configuration. The main changes are:

  • Documents complete index-independent git check-ignore commands.
  • Asserts both full verification commands in the README test.
  • Points sync transport tests at a temporary COMPOZY_HOME.

Confidence Score: 5/5

This looks safe to merge.

  • The README test now checks both complete commands and their paths.
  • The sync test sets its temporary home before database resolution.
  • No blocking issues were found in the changed code.

Important Files Changed

Filename Overview
extensions/cy-capture-decisions/README.md Documents complete ignore verification commands that work for tracked and untracked decision-log files.
extensions/cy-capture-decisions/packaging/readme_test.go Checks both complete copy-and-paste verification commands, including their target paths.
internal/daemon/sync_transport_service_test.go Scopes database resolution to the temporary test home before sync operations run.

Reviews (2): Last reviewed commit: "fix: require complete ignore verificatio..." | Re-trigger Greptile

Comment thread extensions/cy-capture-decisions/packaging/readme_test.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@extensions/cy-capture-decisions/packaging/readme_test.go`:
- Around line 18-20: Wrap the verboseCheck assertion in the surrounding test
with a named t.Run subtest using the required “Should...” naming pattern,
keeping the existing command check and failure message unchanged inside the
subtest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 114e0740-97a6-4313-80e8-64c735869035

📥 Commits

Reviewing files that changed from the base of the PR and between e9d6312 and 78e8caf.

⛔ Files ignored due to path filters (1)
  • extensions/cy-capture-decisions/README.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • extensions/cy-capture-decisions/packaging/readme_test.go
  • internal/daemon/sync_transport_service_test.go

Comment thread extensions/cy-capture-decisions/packaging/readme_test.go Outdated
@pedronauck
pedronauck merged commit e3b155d into compozy:main Jul 17, 2026
8 checks passed
antoniofulg added a commit to antoniofulg/compozy that referenced this pull request Jul 24, 2026
Reverts six PRs that rode along on this branch but are independent of the
Task Groups feature (verified: no task-group code depends on them):
- compozy#234 cy-qa-workflow module + host.tasks.create v2 (extension SDK)
- compozy#237 cy-capture-decisions extension
- compozy#226 Kiro CLI ACP model handling
- compozy#248 sync-test isolation (touched cy-capture-decisions)
- compozy#252 release v0.2.15 prep
- compozy#253 test-daemon reaping

Kept the task-group-relevant infra: compozy#230 (multi-run recovery), compozy#236
(reviews-fix progress), compozy#241 (parallel task status), compozy#250 (task artifacts).
@antoniofulg
antoniofulg deleted the agent/fix-sync-home-and-check-ignore-docs branch July 28, 2026 13:10
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