You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d365a3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This is a personal fork of [pingdotgg/t3code](https://github.com/pingdotgg/t3cod
45
45
-**Changelog:** a timeline of fork releases and commits, also in the update popover for the offered update, the pending upstream commits, a "Start Fork Sync" button and an "Ask agent" menu (`forkChangelogEnabled`, on by default).
46
46
-**Fork Sync:** a daily workflow merges upstream main into fork main. It never rewrites main.
47
47
-**Fork CI:** runs on each push to main and on each pull request to main. Branch protection requires the one check "Fork CI result".
48
-
-**Repair agent:** a failed Fork Sync or Fork Release run, or a failed Fork CI run on main, calls the webhook task "Fork repair" on the VPS, which starts a repair agent. A pull request never calls it.
48
+
-**Repair agent:** a failed Fork Sync or Fork Release run, or a failed Fork CI run on main, calls the webhook task "Fork repair" on the VPS. The repair agent works in one long-lived thread and compacts its context after each repair. A pull request never calls it.
Copy file name to clipboardExpand all lines: docs/fork-agents.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,10 +94,10 @@ To restore, ask the owner first. Then:
94
94
95
95
## Repair agent
96
96
97
-
When Fork CI, Fork Sync or Fork Release fails, `scripts/fork-notify-agent.sh` posts the run to the webhook in the GitHub secret `T3_AGENT_WEBHOOK_URL`. The webhook is the scheduled task "Fork repair" on the VPS, in the project "t3code fork". It starts a repairagent there.
97
+
When Fork CI, Fork Sync or Fork Release fails, `scripts/fork-notify-agent.sh` posts the run to the webhook in the GitHub secret `T3_AGENT_WEBHOOK_URL`. The webhook is the scheduled task "Fork repair" on the VPS, in the project "t3code fork". It posts each run into one long-lived thread, "Fork repair", and the repair agent works there. As its last action, each run queues `/compact` into its own thread with `t3_thread_send` (mode `queue`). The compaction runs as its own turn after the run, so the next repair starts with compacted context. A turn cannot compact itself: the orchestrator rejects `/compact` as a steer.
98
98
99
99
- The repair agent watches the next run of the same workflow.
100
100
- GitHub can start the daily Fork Sync hours after its 03:17 UTC schedule. Before you merge upstream by hand, check `gh run list --workflow fork-sync.yml` and the VPS for a running "Fork repair" thread. If the daily run did not start yet, run the workflow instead of a manual merge. If a repair agent already merges upstream, send it your notes instead of a second merge.
101
101
- On a retry, run the workflow with `notify_agent=false`, so that a second failure does not start another agent.
102
-
- A failure right after a failure of the same workflow does not post, when the notify job of the first failure succeeded.
102
+
- A failure right after a failure of the same workflow does not post, when the notify job of the first failure succeeded and the first failure started less than 6 hours before.
103
103
- To stop the repair agent, disable the "Fork repair" task on the VPS (`machines_command` with `{"_tag":"setScheduledTaskEnabled","taskId":...,"enabled":false}`). To stop all calls, delete the GitHub secret `T3_AGENT_WEBHOOK_URL`.
Copy file name to clipboardExpand all lines: docs/fork.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,8 @@ Fork main only moves forward. Nothing rebases or force-pushes it.
21
21
-`CLI_RELEASE_REPOSITORY` in `packages/shared/src/cliRelease.ts` points the server updaters at the fork releases. `scripts/install.sh` installs from the fork releases, on the nightly channel by default.
22
22
- A manual run from a branch other than main does not publish a release. It uploads the files of each platform as workflow artifacts, for a test of release changes.
23
23
- The release carries `nightly-mac.yml`, `nightly.yml` (Windows), `nightly-linux.yml` (x64) and `nightly-linux-arm64.yml` for electron-updater. Until a platform adds its file, its apps find no update in the new release.
24
-
- If a sync, a release or a Fork CI run fails, its `notify_agent` job runs `scripts/fork-notify-agent.sh`. The script posts the run to `T3_AGENT_WEBHOOK_URL`, a webhook scheduled task on a T3 server that starts a repair agent. A manual run with `notify_agent=false` does not post. A failure right after a failure of the same workflow does not post either, when the notify job of the first failure succeeded, because the agent that it started watches the next run. The script retries the call once a minute for 15 minutes, so a webhook server restart does not lose it.
25
-
- The webhook is the scheduled task "Fork repair" on the VPS T3 server (`yarden-zamir-vps-2`), in the project "t3code fork" (`/root/Github/t3code/main`). The VPS auto-updates once per release, and each update restarts its server for about 20 seconds, which the 15-minute retry covers.
24
+
- If a sync, a release or a Fork CI run fails, its `notify_agent` job runs `scripts/fork-notify-agent.sh`. The script posts the run to `T3_AGENT_WEBHOOK_URL`, a webhook scheduled task on a T3 server that starts a repair agent. A manual run with `notify_agent=false` does not post. A failure right after a failure of the same workflow does not post either, when the notify job of the first failure succeeded and the first failure started less than 6 hours before. The agent that it started watches the next run. The script retries the call once a minute for 15 minutes, so a webhook server restart does not lose it.
25
+
- The webhook is the scheduled task "Fork repair" on the VPS T3 server (`yarden-zamir-vps-2`), in the project "t3code fork" (`/root/Github/t3code/main`). The task posts each run into one long-lived thread, "Fork repair". As its last action, each run queues `/compact` into its own thread with `t3_thread_send` (mode `queue`). The compaction runs as its own turn after the run, so the next repair starts with compacted context. A turn cannot compact itself: the orchestrator rejects `/compact` as a steer. The VPS auto-updates once per release, and each update restarts its server for about 20 seconds, which the 15-minute retry covers.
26
26
- Rollback: to stop the repair agent, disable the "Fork repair" task on the VPS. To stop all calls, delete the GitHub secret `T3_AGENT_WEBHOOK_URL`.
27
27
-`.github/workflows/fork-ci.yml` runs the `ci.yml` commands on GitHub-hosted runners for each push to main. `ci.yml` needs upstream's Blacksmith runners, so it is disabled on the fork.
28
28
- Fork CI also runs for each pull request to main. A newer push to main or to a pull request cancels the Fork CI run of the older push. The repair agent ignores a cancelled run.
0 commit comments