Skip to content
Castellan
Surveyor's icon

Concept · Surveyor

Read as

The Surveyor for developers, your code and tests

With developer features on, the Surveyor also checks your checkouts and worktrees, runs each agent's own tests once a day in a copy, and finds idle coding sessions and tool servers left running.

Article
2503
Applies to
Surveyor 0.4.24
Last reviewed
For
For developers
Written for Surveyor 0.4.24. Surveyor is at 0.4.25 now (1 small release since: what changed).

When it shows#

Only while Castellan's developer features are on: when a developer agent is hired. See Hiring, switching and letting staff go.

With them off, the checks below don't run, and the Surveyor speaks in plain words: no log lines, paths, commands, addresses or exit codes, and a fix is a step in words. With them on, each finding carries its evidence as read, and its fix as a PowerShell command to copy.

Your code#

Each folder under Repository folders (Advanced) that is a git checkout, and each one directly inside it. At first: source\repos, Projects and repos in your user folder.

  • A checkout behind its upstream, with git pull --ff-only to copy when it has nothing of its own.
  • Worktrees whose branch is merged into origin's default branch, or whose folder is gone, with git worktree remove for each clean one, and git worktree prune. One with uncommitted changes is named, not offered.
  • Worktrees whose branch's upstream is gone, as a squash-merged pull request's is, in a note of their own, to check before removing.
  • Reeve's jobs waiting for your approval.

It never fetches: behind is counted as of git's last fetch, and the evidence says when that was. Merged means merged by ancestry, so a squash-merged branch doesn't count.

Your agents' tests#

Once a day, for Castellan and each agent with a checkout under your repository folders: its default branch as origin has it is copied out with git archive into the Surveyor's own folder, never run in your checkout, and npm test runs there, for 10 minutes at most. Nothing is fetched or installed.

  • Tests failing: a warning, with the tests that failed and what each threw.
  • A run that passes on the second try: a note that it's flaky, naming the tests.
  • Programs a test run left running: a warning, with Stop-Process to copy. The Surveyor stops nothing.

A commit already tested isn't tested again for a week.

Idle sessions and tool servers#

The PC check also finds idle AI coding sessions, when there are 5 or more, or they hold 1 GB of memory between them, and MCP tool servers left running after the program that started them has exited. It never stops a process, and Castellan's agents are never named.

Its settings for developers#

SettingDefaultWhat it does
Checks: code, testsOnShown only with developer features on.
Repository folders (Advanced)source\repos, Projects, reposEach folder that is a checkout, and each one directly inside.
When to speak up (Advanced)5 sessions, 1 GB, 24 hoursIdle sessions and their memory for a warning; the hours of log read for errors.

Is this page right?

If something on it is wrong or out of date, tell us and we'll fix the page.

Still stuck? Write to support@castellan-software.com and mention article 2503. Every version of Surveyor, and what changed in it, is in its release notes.