PoC: add context files#4798
Conversation
This commit adds 2 context files used by ai agents: - AGENTS.md - general context file containing project overview - integration-test-review/SKILL.md - context file containing instructions for reviewing changes made to integration tests AGENTS.md file placed at repo root is recognized by both opencode and copilot tools. By default, SKILL.md files live under different paths in opencode and copilot tools, but they both support claude SKILL.md paths, so that's why it was placed there. This is the first iteration of trying to use context files in SM repo and their contents will be adjusted after gathering more info on how they do.
|
@copilot review changes in this PR |
There was a problem hiding this comment.
Pull request overview
This PR introduces agent/context documentation files and changes default backup keyspace selection to exclude temporary keyspaces, with an integration test validating tmp* keyspaces are omitted from backup targets.
Changes:
- Add default exclusion for
tmp*keyspaces in backup task properties. - Add an integration test asserting
tmp*keyspaces are not included in backup targets even when requested. - Add repository context/documentation files for agents and integration test review.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| pkg/service/backup/model.go | Changes default backup keyspace filters to exclude tmp*. |
| pkg/service/backup/service_backup_integration_test.go | Adds integration coverage around excluding tmp* keyspaces from backup targets. |
| AGENTS.md | Adds high-level repository/module and development workflow documentation. |
| .claude/skills/integration-test-review/SKILL.md | Adds guidelines for reviewing integration test changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
|
|
||
| func TestTmpKsIntegration(t *testing.T) { |
There was a problem hiding this comment.
This integration test name does not follow the documented convention in this repo (service-prefixed and ...Integration suffix, e.g. TestBackup...Integration). Also, the test covers multiple scenarios (3 different keyspace inputs) but is not table-driven; converting to table-driven subtests would make failures clearer and align with the guidance added in .claude/skills/.../SKILL.md.
| func TestTmpKsIntegration(t *testing.T) { | |
| func TestBackupTmpKsIntegration(t *testing.T) { |
There was a problem hiding this comment.
I wonder if ai saw what is the purpose of this PR and crafted response to satisfy it:)
| Transfers: scyllaclient.TransfersFromConfig, | ||
| Method: MethodRclone, | ||
| Continue: true, | ||
| Keyspace: []string{"*", "!tmp*"}, |
There was a problem hiding this comment.
This changes the default keyspace selection behavior, but the added integration test only exercises cases where keyspace is explicitly provided. Please add a coverage case where keyspace is omitted (i.e., rely on defaults) and assert that tmp* keyspaces are excluded, to directly validate this default-property change.
There was a problem hiding this comment.
good comment
|
|
||
| ### SM server architecture | ||
|
|
||
| SM server is build around its scheduler responsible for scheduling and triggering tasks and services responsible |
There was a problem hiding this comment.
Correct grammar: 'build' → 'built'.
| SM server is build around its scheduler responsible for scheduling and triggering tasks and services responsible | |
| SM server is built around its scheduler responsible for scheduling and triggering tasks and services responsible |
|
|
||
| ### SM agent architecture | ||
|
|
||
| SM agent is a small server running on every Scylla node. It servers a proxy for SM server to Scylla HTTP REST API, |
There was a problem hiding this comment.
Correct grammar: 'servers' → 'serves'.
| SM agent is a small server running on every Scylla node. It servers a proxy for SM server to Scylla HTTP REST API, | |
| SM agent is a small server running on every Scylla node. It serves as a proxy for SM server to Scylla HTTP REST API, |
| - utils module (./v3/pkg/utils) containing generic legacy helpers (new helpers are added to ./pkg/util2) | ||
|
|
||
| In case changes need to be made across multiple modules, the need to be merged in separate per module PRs. | ||
| Modules in go.mod can only reference commits from master branch. |
There was a problem hiding this comment.
This repo appears to use main (diffs are index main..branch), but the doc says 'master branch'. Please update this to the correct branch name to avoid misleading contributors.
| Modules in go.mod can only reference commits from master branch. | |
| Modules in go.mod can only reference commits from main branch. |
| - Test name should start with `Test` followed by service name (if applicable) and end with `Integration` (e.g., `TestBackupSmokeIntegration`) | ||
| - They should start with a comment explaining which features are tested | ||
| - They should follow the table-driven approach whenever multiple scenarios are tested. Table entry should contain at least the test name and description | ||
| - Each tested feature should be covered by a separate test of subtest, unless it's too small to justify such separation |
There was a problem hiding this comment.
Correct wording: 'of subtest' → 'or subtest'.
| - Each tested feature should be covered by a separate test of subtest, unless it's too small to justify such separation | |
| - Each tested feature should be covered by a separate test or subtest, unless it's too small to justify such separation |
Here's the review of all changes in this PR: 1.
|
No description provided.