Skip to content

Hermes Agent context engine: the main model writes the compaction handoff on its cached prompt prefix

Run CI without approval for pull requests from this repository

Elevatormusic5cb80108962b
diff --git a/.github/workflows/hermes-compatibility.yml b/.github/workflows/hermes-compatibility.yml
index a6dc27f..1695777 100644
--- a/.github/workflows/hermes-compatibility.yml
+++ b/.github/workflows/hermes-compatibility.yml
@@ -22,7 +22,7 @@ concurrency:
jobs:
contract:
name: Hermes contract (${{ matrix.hermes }})
- environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || 'ci-approval' }}
+ environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && 'ci-approval' || '' }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b56a02e..d6db342 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -14,7 +14,7 @@ concurrency:
jobs:
ruff:
- environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || 'ci-approval' }}
+ environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && 'ci-approval' || '' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4b2d1d7..280c852 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -15,7 +15,7 @@ concurrency:
jobs:
issue-policy:
name: Issue policy unit tests
- environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || 'ci-approval' }}
+ environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && 'ci-approval' || '' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
@@ -30,7 +30,7 @@ jobs:
unit:
name: unit (${{ matrix.os }}, ${{ matrix.python-version }})
- environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || 'ci-approval' }}
+ environment: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'ci-main' || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && 'ci-approval' || '' }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a78418..391969a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ All notable changes are listed here. The format follows [Keep a Changelog](https
- Give fallback generation an 8,192-token allowance while keeping the visible summary within 2,048 estimated tokens. Check a fresh end marker and the summary content instead of refusing a short reply because its reported output count can include thinking. Retry an invalid reply once from the original transcript, within a shared deadline and cancellation checks. The public API still cannot report the server stop reason or stop an in-flight call.
- Ask the fallback model to keep unreported progress unknown and keep rules separate from confirmed actions. Preserve approval conditions and do not add a goal from a prohibition. These prompt rules do not guarantee factual accuracy.
-- Run CI checks automatically for pushes to `main` through the approval-free `ci-main` environment, which allows only the branch named `main`. Keep approval through `ci-approval` for pull requests, scheduled runs, and manual dispatch. Local checks still need an explicit request.
+- Run CI checks automatically for pushes to `main` through the approval-free `ci-main` environment, which allows only the branch named `main`. Run CI checks automatically for pull requests from branches in this repository. Keep approval through `ci-approval` for pull requests from forks, scheduled runs, and manual dispatch. Local checks still need an explicit request.
- Keep separate Hermes compatibility concurrency groups for each event and ref. Scheduled and manual runs cannot cancel an automatic push run.
- Remove the fixed summary without a model. If the warm request and model-based fallback cannot produce a usable summary, stop the current compaction pass, preserve its input history, and report safe error codes. Hermes can retry an automatic failure; the plugin does not stop the entire host turn. This includes incomplete or oversized fallback replies and a retained-history layout that cannot fit safely.
- Keep the fallback on `auxiliary.warm_compaction`; `auto` follows the main chat route. This task stays separate from the built-in compressor's `auxiliary.compression` task.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2b0128b..e2d5942 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -98,12 +98,15 @@ Local code tests and lint need a manual maintainer or reviewer action for each r
Do not start or repeat them automatically after a change, review, or failure.
An agent must wait for an explicit request to run local checks. CI uses the
protected `ci-approval` environment for policy unit tests, unit and property
-tests, Ruff, syntax checks, and all Hermes suites, except for pushes to `main`.
+tests, Ruff, syntax checks, and all Hermes suites, except for pushes to `main`
+and pull requests from branches in this repository.
A `push` event on `refs/heads/main` selects the approval-free `ci-main` environment
-and runs these checks automatically. All other events select `ci-approval`.
-Pull requests, scheduled runs, and manual dispatch still need approval, including
-scheduled runs and manual dispatch on `main`.
+and runs these checks automatically. A pull request whose head branch is in this
+repository selects no environment and also runs automatically. Only users with
+write access can push such a branch. All other events select `ci-approval`.
+Pull requests from forks, scheduled runs, and manual dispatch still need approval,
+including scheduled runs and manual dispatch on `main`.
The Hermes compatibility workflow keeps separate concurrency groups for each
event and ref. A newer run cancels an earlier run only when both match.