55 lines
2.0 KiB
Markdown
55 lines
2.0 KiB
Markdown
# Local Scheduled Workspace Verification
|
|
|
|
The Windows Task Scheduler runs the same read-only workspace verification as the manual command. It does not compose documents, update repositories, perform Git operations, or access the network.
|
|
|
|
## Manual verification with a retained log
|
|
|
|
Run the scheduled-verification wrapper directly before registering the task:
|
|
|
|
```powershell
|
|
npm.cmd run verify:scheduled
|
|
```
|
|
|
|
Each execution stores a UTF-8 log below `.local/verification-logs`. The directory is ignored by Git, and logs older than 30 days are removed after an execution finishes.
|
|
|
|
## Register the weekday task
|
|
|
|
Register the task for the current Windows user:
|
|
|
|
```powershell
|
|
npm.cmd run schedule:install
|
|
```
|
|
|
|
The default task is named `KRI Agent Harness Workspace Verify` and runs Monday through Friday at 08:30. It uses one process at a time, retries a failed task up to three times, and runs a missed schedule when the signed-in user becomes available.
|
|
|
|
The task uses an interactive, limited Windows principal. The computer must be running and the registered user must be signed in before the process can execute.
|
|
|
|
To use a different time, call the registration script directly with an `HH:mm` value:
|
|
|
|
```powershell
|
|
.\scripts\register-scheduled-verification.ps1 -At <HH:mm>
|
|
```
|
|
|
|
## Remove the task
|
|
|
|
```powershell
|
|
npm.cmd run schedule:uninstall
|
|
```
|
|
|
|
Removing the task does not remove retained verification logs.
|
|
|
|
## Result handling
|
|
|
|
Task Scheduler records the verification process exit code:
|
|
|
|
- `0`: all registered Agent Harness documents are current;
|
|
- non-zero: a missing repository, invalid profile, stale generated document, or another verification error was detected.
|
|
|
|
Treat a failed task as a drift report, not as authorization for automatic repair:
|
|
|
|
1. inspect the newest log in `.local/verification-logs`;
|
|
2. update the authoritative `.agent` source when a rule changed;
|
|
3. run `plan` and obtain approval for affected repositories;
|
|
4. run the narrowest applicable `compose` command;
|
|
5. run the verification again and commit each repository independently after approval.
|