mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 05:16:50 +01:00
test: assert company skills are removed during company cleanup (#13490)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Company removal must remove company-owned database rows. > - The cleanup path already removes company skills. > - The existing test creates a company skill but does not check its removal. > - This pull request adds that missing assertion. > - The assertion guards the company cleanup contract. ## Linked Issues or Issue Description Refs: #3038 Supersedes #13240. This PR restores the original change after its branch was deleted. ## What Changed - Assert that no company_skills rows remain after company removal. ## Verification - The cleanup-removal-service.test.ts suite passed all four tests in CI run 35006708817. - That run failed in execution-control-reconciliation.test.ts and composer-stop.spec.ts. - Those failures concern code outside this one-line test change. - CI must run again after the branch update. - No local test run has been completed during adoption. ## Risks - Low risk. This change adds one test assertion and changes no production code. ## Model Used - Adoption assistance: OpenAI Codex, based on GPT-6, with code review, shell tool use, and GitHub inspection. - The exact backend model ID and context window are not exposed in this session. - This assistance covers CI diagnosis, this description update, and branch integration. - The original author's model use was not disclosed. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [ ] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [ ] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes: #` / `Refs: #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [ ] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [ ] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Andrew Aymeloglu <aaymeloglu@gmail.com>
This commit is contained in:
1 parent
dfd5b1ac62
commit
49fe8b87a4
1 file changed
+1
@@ -248,6 +248,7 @@ describeEmbeddedPostgres("cleanup removal services", () => {
|
||||
expect(removed?.id).toBe(companyId);
|
||||
await expect(db.select().from(companies).where(eq(companies.id, companyId))).resolves.toHaveLength(0);
|
||||
await expect(db.select().from(issues).where(eq(issues.id, issueId))).resolves.toHaveLength(0);
|
||||
await expect(db.select().from(companySkills).where(eq(companySkills.companyId, companyId))).resolves.toHaveLength(0);
|
||||
await expect(db.select().from(documents).where(eq(documents.id, documentId))).resolves.toHaveLength(0);
|
||||
await expect(db.select().from(documentRevisions).where(eq(documentRevisions.id, revisionId))).resolves.toHaveLength(0);
|
||||
await expect(db.select().from(issueReadStates).where(eq(issueReadStates.companyId, companyId))).resolves.toHaveLength(0);
|
||||
|
||||
Reference in new issue
Block a user