Commit Graph
4806 Commits
Author SHA1 Message Date
Devin FoleyandPaperclip 088a838454 test: reject stale mutation reports after missing output
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:24:30 -07:00
Devin FoleyandPaperclip e3e74d369f Merge final accounting follow-ups into CI stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:24:29 -07:00
Devin FoleyandPaperclip 6af7db0166 Merge final budget and CI follow-ups into dashboard stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:24:20 -07:00
Devin FoleyandPaperclip 2e9b1de70e fix: preserve policy settings and initialize cancellation on demand
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:24:09 -07:00
Devin FoleyandPaperclip 34066b600b test: retain mutation failure evidence in trusted CI
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:20:41 -07:00
Devin FoleyandPaperclip c1468c66eb Merge accounting and dashboard review fixes into CI stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:20:27 -07:00
Devin FoleyandPaperclip f63b9e3243 fix: address dashboard and finance review findings
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:20:22 -07:00
Devin Foley 85c8b8f72a Merge accounting review fixes into dashboard stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>

# Conflicts:
#	ui/src/components/AccountQuotaPanels.tsx
#	ui/src/components/ProviderQuotaCard.tsx
#	ui/src/pages/Costs.production.tsx
#	ui/src/pages/Costs.tsx
2026-10-03 21:15:26 -07:00
Devin FoleyandPaperclip 482cdc5fa5 Merge adapter and quota review fixes into accounting stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:15:10 -07:00
Devin FoleyandPaperclip 05035f9f65 fix: address accounting recovery and budget review findings
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:15:10 -07:00
Devin FoleyandPaperclip feba1f926f Merge adapter timeout contract regression update
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:11:22 -07:00
Devin FoleyandPaperclip 14bc077440 test: distinguish unavailable Kimi prices from incomplete receipts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:10:56 -07:00
Devin FoleyandPaperclip dce0c0f265 Merge reviewed quota and adapter fixes into durable accounting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:06:51 -07:00
Devin FoleyandPaperclip bd377f0906 fix: recover managed quota credentials and preserve account displays
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:06:14 -07:00
Devin FoleyandPaperclip 2c29548c8c Merge reviewed adapter receipt fixes into account quota reporting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:02:21 -07:00
Devin FoleyandPaperclip 17bb7679b5 test: clean up interrupted usage fixture formatting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:02:05 -07:00
Devin FoleyandPaperclip c858cf52b0 fix: settle adapter usage only with terminal accounting evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 21:01:46 -07:00
Devin FoleyandPaperclip f056a4ae59 Merge test isolation review fixes into adapter receipts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 20:59:55 -07:00
Devin FoleyandPaperclip 1885918563 test: preserve host port leases with isolated test homes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-03 20:59:38 -07:00
Devin FoleyandPaperclip d6079fddb9 ci: carry exact Storybook provider report totals
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:11:31 -07:00
Devin FoleyandPaperclip 5280ad2615 test: preserve exact report totals in Costs Storybook fixtures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:10:36 -07:00
Devin FoleyandPaperclip 72a9e46b15 ci: include verified Storybook accounting fixtures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:02:57 -07:00
Devin FoleyandPaperclip 6e90f5d107 fix: make Costs Storybook finance actions work without a backend
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 18:02:56 -07:00
Devin FoleyandPaperclip c6f8a09a66 ci: run accounting gates against the reviewed dashboard stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:48:15 -07:00
Devin FoleyandPaperclip ba9e995687 fix: integrate reviewed accounting and adapter recovery changes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:47:51 -07:00
Devin FoleyandPaperclip dc8d57e2a4 test: verify durable checkpoints through the final flush contract
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:47:50 -07:00
Devin FoleyandPaperclip c0aa8f879d fix: integrate reviewed adapter and quota contracts into accounting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:45:27 -07:00
Devin FoleyandPaperclip 5137effc6f fix: integrate incremental usage checkpoints with quota reporting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:45:26 -07:00
Devin FoleyandPaperclip 014810c58d fix: checkpoint every usage update with incremental protocol parsers
Use provider terminal evidence for completeness; an OpenCode successful EOF closes its step-based stream. Preserve immutable snapshots and propagate partial completeness through final results.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:45:06 -07:00
Devin FoleyandPaperclip 3250149305 fix: invalidate quota caches when personal credentials are disabled
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:37:20 -07:00
Devin FoleyandPaperclip c93ef478b3 fix: carry reviewed adapter checkpoints into quota reporting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:34:12 -07:00
Devin FoleyandPaperclip 6b915d35ed test: carry Cursor fixture isolation into adapter review
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:34:09 -07:00
Devin FoleyandPaperclip 2a811ea1a9 test: forward stdin through the Cursor fixture runner
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:33:49 -07:00
Devin FoleyandPaperclip e1c61054cc fix: settle interrupted usage and retain estimate provenance
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:33:13 -07:00
Devin FoleyandPaperclip f4100b256e fix: flush attempt receipts and surface checkpoint failures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:27:02 -07:00
Devin FoleyandPaperclip 3ac5772c66 fix: isolate budget recovery and account supplemental run charges
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:15:39 -07:00
Devin FoleyandPaperclip 7f1c42b672 fix: preserve budget settings and confirm uncertain financial entries
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:14:47 -07:00
Devin FoleyandPaperclip 5997745d77 fix: carry quota review fixes into durable accounting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:01:54 -07:00
Devin FoleyandPaperclip 5825f92c62 fix: retain quota caches across reads and cancel expired probes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:01:49 -07:00
Devin FoleyandPaperclip c1602b52bc ci: require accounting coverage recovery and mutation checks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 17:00:15 -07:00
Devin FoleyandPaperclip 1444914a2b fix: unify cost reporting and expose accounting workflows
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:58:51 -07:00
Devin FoleyandPaperclip ffd09c80e6 test: carry reviewed discovery checks into quota reporting
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:53:20 -07:00
Devin FoleyandPaperclip 3e77a70622 test: carry authored-file review coverage into adapter changes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:53:17 -07:00
Devin FoleyandPaperclip e8f389beb6 test: exercise authored-file discovery through a real Git index
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:52:55 -07:00
Devin FoleyandPaperclip 4154638e71 fix: make run accounting durable and budget updates atomic
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:45:54 -07:00
Devin FoleyandPaperclip f9163760b9 fix: scope subscription quota reports to authorized company accounts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:41:32 -07:00
Devin FoleyandPaperclip b827836835 fix: checkpoint adapter usage and preserve unknown prices
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:39:07 -07:00
Devin FoleyandPaperclip 7eb38f881e test: isolate accounting fixtures and include all adapter suites
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:35:32 -07:00
Devin FoleyandPaperclip 4abff286c2 fix: retain resolved ACP execution timeout metadata (#14986)
## Thinking Path

> - Paperclip manages agent work through adapters and heartbeat runs.
> - ACP adapters resolve a timeout for the selected execution target.
> - An untouched sandbox timeout uses a four-hour default.
> - Heartbeat finalization rebuilt the metadata from the stored zero.
> - This made a timed-out sandbox run report an effective timeout of
zero.
> - This change retains the adapter's resolved policy for accurate run
diagnostics.

## Linked Issues or Issue Description

**What happened?**

ACP sandbox runs with `timeoutSec: 0` use the four-hour default. Their
terminal metadata reports `effectiveTimeoutSec: 0` and `timeoutSource:
config` because heartbeat finalization only reads the stored agent
configuration.

**Expected behavior**

The result must report the policy the adapter used: `14400` and
`sandbox_default`. Explicit limits, fractional limits, explicit
unlimited overrides, and local defaults must keep their resolved values.

**Steps to reproduce**

Run an ACP adapter on a sandbox target with `timeoutSec: 0`. Compare the
start log's four-hour policy with the terminal result's effective
timeout. The new tests exercise the adapter result and the heartbeat
metadata merge without waiting four hours.

**Paperclip version or commit**

Reproduced from `6eaf218924f0a89faf1c02eb0d6877a6c5c8a2cb`.

**Deployment mode**

Self-hosted server with an ACP sandbox execution target.

Searched open timeout and metadata issues and PRs. Related #14804
exposes timeout configuration in forms; #14496 proposes a default
policy; #14833 addresses CLI session retention. This PR changes only ACP
result metadata.

## What Changed

- Retain the resolved timeout in the ACP result after settlement.
- Use validated adapter resolution when merging terminal timeout
metadata. Preserve config fallbacks for older adapters and the HTTP
millisecond policy.
- Test sandbox defaults, explicit and fractional limits, explicit
unlimited overrides, local defaults, malformed metadata, and unchanged
cancellation fields.
- Document the result fields and their meaning.

## Verification

- `pnpm -r typecheck` passed.
- `pnpm build` passed.
- Stop metadata tests: 23 passed.
- Reporter and diagnostic suites: 84 passed; two real-Sentry-SDK tests
skipped because the optional SDK is not installed.
- ACP engine suite: all 206 tests passed with a deterministic local
`gemini --version` shim. Ambient host CLI probes made the existing
Gemini session-resume fixture intermittent (one assertion failure in
each of two broad runs); an isolated 15-case rerun and the clean-base
206-test suite also passed. No assertion or timeout was changed.
- `pnpm test:run` is in progress. This PR does not claim a complete
local suite pass.
- Independent review found no blocking issues. The tests cover real
adapter emission and the real metadata merge separately.

## Risks

Low runtime risk: this changes result diagnostics. It does not change
timeout values, cancellation acknowledgement, cleanup, checkpoint
safety, retries, or provider operations. It does not fix the cause of a
quiet or long-running tool. Older stored results are not rewritten. The
new source values apply only when an adapter returns a valid resolution.

## Model Used

OpenAI GPT-6 with reasoning, repository inspection, code editing, and
test execution. The deployment-specific model ID and context-window size
are not exposed in this session.

## 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)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] 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
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [x] 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: Paperclip <noreply@paperclip.ing>
2026-10-02 16:09:36 -07:00
DottaandPaperclip 862a5758ba fix(agents): reduce hiring templates to role descriptions (#14985)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for work.
> - New agents receive role instructions from onboarding, the hiring skill, or a team package.
> - These sources repeat harness procedures and impose generic work policies.
> - They can crowd out the task and the harness instructions.
> - This pull request reduces those sources to short role descriptions.
> - It preserves configuration, skills, authentication, reporting lines, and approval controls.
> - The benefit is less repeated instruction text with explicit coverage for the default hiring path.

## Linked Issues or Issue Description

Refs #3307. The CEO template can impose a fixed delegation route instead of letting the agent choose how to fulfill the request. This change removes that route. It does not implement autonomous goal selection.

Related work: #14920 preserves stock Codex base instructions. #14948 reduces the generic manual and shared runtime prompts. #14961 improves native completion-tool descriptions. This PR is separate from those changes.

## What Changed

- Select only the short CEO `AGENTS.md` for new default CEO bundles. Keep the three former companion files as compatibility assets.
- Reduce the first-agent chief-of-staff prompt and coder, QA, UX, and security role examples.
- Reduce seven bundled team role bodies. Preserve their role, reporting, and skill metadata. Regenerate the catalog.
- Make hiring examples optional. Replace the long generic role manual with short role drafting guidance. Preserve explicit requester instructions.
- Add configuration and import coverage for native and legacy managed bundles, custom instructions, first-agent rendering, and catalog contents.
- Add an explicit-only hiring eval that starts from the production CEO default and checks one coder hire, independently computed JSON output, saved instructions, and worker reuse.
- Include the full prompt comparison and a separate three-request drafting simulation. Neither is a live provider comparison.

Prompt differences: [before and after](doc/plans/2026-10-02-hiring-template-prompt-diff.md). The CEO default falls from 1,897 to 20 words. The coder example falls from 652 to 18 words. Word counts describe instruction size, not outcome quality or billing.

## Verification

- PASS: 99 focused server tests and eight shipped-catalog tests.
- PASS: catalog generation and validation for four shipped teams.
- PASS: hiring skill validation.
- PASS: `pnpm -r typecheck`.
- PASS: `pnpm build`.
- INCOMPLETE: the full local `pnpm test:run` was stopped before rebase. Its original log is retained. This is not a completed full-suite pass. The full current-head GitHub CI workflow passed: https://github.com/paperclipai/paperclip/actions/runs/37073372419.
- PASS: `pnpm test:e2e:runner:typecheck` and `pnpm test:e2e:runner:unit` (63 files / 843 tests).
- PASS: discovery for the two new hiring cells, 50 existing everyday cells, and the full 438-cell catalog.
- PASS after rebase: 99 server tests, 11 catalog tests, 62 selected E2E support tests, and the E2E typecheck.
- PASS: all current-head PR checks at `57dcee147ed0b2d2e3cc657cd9e50fb16bf9ec25`: 51 successful check runs, two intentional Storybook skips, and successful Snyk status. Fresh Greptile is 5/5 with zero unresolved threads.
- PENDING follow-up: matched live hiring runs on frozen integration refs. No live outcome-quality or non-regression result is claimed from the configuration checks or this merge.

The new suite has two local native cells: Codex and ACPX Claude. It expects five provider turns per cell. It compares source-derived bundles, so the historical long templates remain admissible. Missing successful source-read receipts make a pair uncomparable. They do not establish a behavior regression or equivalence.

## Risks

- New default roles have fewer prescribed procedures. Live checks must determine whether a removed instruction was needed for an outcome.
- Existing custom and saved bundles keep their contents. The retained companion assets avoid a source-file compatibility break.
- Specialized Summarizer, Reflection Coach, and Wiki Maintainer prompts remain unchanged. Their product contracts need separate review.
- The generic non-CEO fallback reduction is in #14948. This PR alone does not provide its eight-word fallback.
- Configuration tests and drafting simulations do not establish live outcome quality. QA, UX, security, and chief-of-staff hiring behavior remain outside the new two-cell comparison.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`.

## Model Used

OpenAI Codex, based on GPT-6, with reasoning, code editing, shell tools, and delegated verification. The runtime does not expose the exact deployment model ID or context-window size.

## 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)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work
- [x] 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
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] 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: Paperclip <noreply@paperclip.ing>
canary/v2026.1002.0-canary.20
2026-10-02 17:56:42 -05:00