Skip to content

Archive and restore a project - #992

Open
jeremy wants to merge 4 commits into
mainfrom
sdk-absorb/card-10447983764
Open

jeremy wants to merge 4 commits into
mainfrom
sdk-absorb/card-10447983764

Conversation

@jeremy

@jeremy jeremy commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

basecamp projects archive <id> takes a project off the active list, and basecamp projects unarchive <id> brings it back.

Why

[CLI] Archive and unarchive a project: the SDK has had these two operations since basecamp-sdk#679, and the coverage report (basecamp-sdk#1055) lists them as unreached by the CLI. recordings archive goes through the generic ArchiveRecording, not the project endpoints, which are the ones that answer 403 where the admin pro pack restricts archiving.

What changed

Operation Command
ArchiveProject basecamp projects archive <id>
UnarchiveProject basecamp projects unarchive <id>
  • Both answer {id, status}. Each offers projects show as a follow-up, and archive also offers projects unarchive to undo it, carrying --profile and --account where the run needed them. unarchive offers no undo, because the project may have come from the trash and archiving it wouldn't put it back. The endpoints return 204 with no body, so neither re-reads the project; projects delete answers the same way.
  • unarchive also restores a project from the trash, as the API does, and fails with limit_exceeded at the account's project limit. Its help and agent notes say both, as do archive's for the admin pro pack's 403.
  • Catalog entry, .surface, and an API-COVERAGE.md row with the summary counts (228 of 228 after merging main). skills/basecamp/SKILL.md isn't touched: main has grown it to within 30 bytes of its 16 KB limit, and both caveats are in the commands' help and agent notes, which the skill names as the source of truth.

Builds on

Main at 5f88c4f2, whose pinned SDK (v0.33.0) has both operations, merged with main through e18cb59 (SDK v0.39.0) on 2026-11-23. No bump in this PR.

Left out

ArchiveRecording, the third operation the planner found on the card: main already reaches it through recordings archive.

Tests

  • Unit (internal/commands/projects_archive_test.go): the request each command sends, its output and follow-ups (none offering archive after unarchive), follow-ups keeping scope, the 403 and the 507 reported as errors with nothing on stdout, a bad ID refused before any request.
  • e2e (e2e/projects.bats): missing and non-numeric IDs, the help text on restoring from the trash.
  • Smoke (e2e/smoke/smoke_projects_write.bats): archive then unarchive in the project lifecycle, checked with projects show. Written but not run: smoke needs a live account.

On 2e670c9 every bin/ci stage passed on thelio except the unit suite, run twice under heavy load. Its only failures there were connector timing tests this PR doesn't touch (TestAFreshSiblingNamesWhereTheEarlierHeldStateLives, TestDiagnosticsSayWhatTheRunningConnectorDoes, TestAPingsFlagGivenFalseIsTheOtherChoice, TestIntakeHoldsTheVerdictWhileIntakeIsBusy), and each passed when run alone. Remote CI is green on the head.

Gap card

https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10447983764

projects archive and projects unarchive reach the SDK's ArchiveProject and
UnarchiveProject, the project endpoints recordings archive doesn't use. They
answer 403 where the admin pro pack restricts archiving, and unarchive also
restores from the trash, answering 507 at the account's project limit.
@jeremy

jeremy commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🤖 @codex review

@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills docs labels Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T20:06:18.143352Z 2e670c9 Manual request
🔒 Security Review ✅ Completed 2026-10-30T16:51:32.961364Z 3d4e5c9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4451495f8c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4451495f8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/commands/projects.go Resolved
unarchive also restores from the trash, and archiving a project it brought
back from there would not put it back. archive still offers unarchive.
@jeremy

jeremy commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🤖 @codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 3d4e5c9a51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3d4e5c9a51

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jeremy

jeremy commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🤖 Converged on 3d4e5c9a: CI green, Codex found no issues on this head (its one earlier finding, the undo follow-up after unarchive, is fixed and resolved), no open threads, mergeable. Copilot was requested twice, on open and again on this head, and never reported. Marked ready for a person to merge.

TestHardenConfigDir fails locally on thelio on a clean 5f88c4f2 too, and passes in CI here. That is the machine, not this PR, but worth a look on its own.

@jeremy
jeremy marked this pull request as ready for review October 30, 2026 16:49
@jeremy
jeremy requested a review from a team as a code owner October 30, 2026 16:49
…983764

* origin/main: (47 commits)
  Keep a person's client flag when it is false (#1055)
  Filter gauge listings by chosen projects (#1049)
  Say how to recover a broken connect.json, and keep reporting around it (#1053)
  Support schedule entry drafts, highlights, and join links (#1019)
  Let auth login reach a beta preview on a private network (#1054)
  Resubscribe the feed when its socket stays connected and stops delivering (#1056)
  Open pin-comment repair PRs as the org PR bot (#1052)
  Stop approving Dependabot PRs with GITHUB_TOKEN (#1048)
  Send mentions and files back bare when rich text is edited (#1046)
  Bump the basecamp/mcp toolkit, and title every MCP tool (#1045)
  Stop telling an agent to send a Markdown fold as HTML (#1030)
  Update nix flake and plugin version for v0.30.0 (#1042)
  Watch a connector in a terminal, and talk to its orchestrator (#1039)
  Lift the connector's cap on workers, and let a start set one (#1040)
  Never give the connector's monitor a timeout (#1035)
  Update nix flake and plugin version for v0.29.0 (#1037)
  Let assignments notify people with --notify (#1034)
  Update nix flake and plugin version for v0.28.1
  Bind local config trust to approved settings
  Update nix flake and plugin version for v0.28.0 (#1029)
  ...

# Conflicts:
#	API-COVERAGE.md
#	skills/basecamp/SKILL.md
The basecamp skill is capped at 16 KiB and main has grown to within 30
bytes of it. Both caveats are already in the agent notes of projects
archive and projects unarchive, which the skill names as the source of
truth.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 20:04
@jeremy

jeremy commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@github-actions github-actions Bot removed the skills Agent skills label Nov 23, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 2e670c92f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI 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.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

2 open issues
What changed in this PR

Adds project archive/unarchive support to the CLI, including command wiring and test coverage around status changes.

Changes:

  • Add projects archive and projects unarchive commands backed by SDK status endpoints.
  • Introduce unit + e2e tests for success paths, scope-preserving follow-ups, and common error cases.
  • Update command catalog / surface area and API coverage documentation.
File Description
internal/​commands/​projects.go Adds archive/unarchive subcommands and shared status-change runner.
internal/​commands/​projects_archive_test.go Adds request-level unit tests for status changes and error handling.
internal/​commands/​commands.go Registers new projects actions in the command category listing.
e2e/​smoke/​smoke_projects_write.bats Adds smoke coverage for archiving/unarchiving a real project.
e2e/​projects.bats Adds CLI behavior tests for missing/invalid IDs and help text.
API-COVERAGE.md Documents newly-covered endpoints and updates totals.
.surface Updates surfaced CLI commands/args/flags to include archive/unarchive.

Review effort: Lite

Comment thread internal/commands/projects.go Resolved
@jeremy

jeremy commented Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

🤖 Converged again on 2e670c9. Main had moved 47 commits and this branch no longer merged.

  • fac2138 merges main through e18cb59. API-COVERAGE.md and skills/basecamp/SKILL.md conflicted, and both sides' additions are kept: the summary now reads 60 sections and 228 endpoints implemented, 64 and 240 tracked, and the coverage paragraph names both archive/unarchive and main's doors and hill chart updates.
  • 2e670c9 drops this PR's two-line archive note from skills/basecamp/SKILL.md. Main has grown the skill to within 30 bytes of its 16 KiB cap (TestBasecampSkillStaysDiscoveryFirstAndFocused), and both caveats (unarchive also restores from the trash, archive may get 403 on the admin pro pack) are already in the agent_notes of projects archive and projects unarchive, which the skill names as the source of truth.

The approval from 30 October was given on 3d4e5c9, before this merge.

Gate: on this host under heavy load, every bin/ci stage passed except the unit suite. There, the only failures across two runs on this head were connector timing tests this PR doesn't touch (TestAFreshSiblingNamesWhereTheEarlierHeldStateLives, TestDiagnosticsSayWhatTheRunningConnectorDoes, TestAPingsFlagGivenFalseIsTheOtherChoice, TestIntakeHoldsTheVerdictWhileIntakeIsBusy), each of which passed when run alone. CI is green on the head.

Codex found no issues on 2e670c9. Copilot reported on it with two findings, both declined in their threads and resolved:

No open threads. Mergeable.

Copilot AI 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.

🟢 Approved

No active review issues are recorded for the new project archive and unarchive commands.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@jeremy

jeremy commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

🤖 Copilot's first review of 2e670c9 ran without its full suite, and its check failed. Re-requested, its full review approved 2e670c9 with no open issues, and the check passes. The PR body is updated for this head.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations docs tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants