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
v3.22.0: revert lessons from GitHub and per-request key grants
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
A revert commit and a CODEOWNERS change on the default branch each become a memory with a link to the commit. Subscribe the GitHub webhook to Pushes and each revert or reapply in a push gives one lesson, with a link to the original commit or pull request when the message names one; a revert pull request merged with its title gives one, not two. A push takes its delivery hold before its lesson write and frees it when the write fails, so GitHub redelivery stores the lessons; a copy of a push answers 409. hippo github backfill --lessons reads default-branch commits for reverts and CODEOWNERS changes, from --since on every run, else from the last 30 days, and the token needs Contents read. A parked push replays with hippo github dlq replay.
serve takes a keyGrants hook that adds restricted scopes to an owned member API key on each request.keyGrants({ tenantId, keyId, owner }, signal) returns scope names, and they join the key's stored grants for that request, so an add-on can grant a scope by a rule of its own and a change applies on the next request. It is never asked for an admin key, a key with no owner, the local key or a caller an authResolver answered. A throw, a rejection, a miss of keyGrantsTimeoutMs (5000 ms by default), an answer that is not an array, more than 1024 entries, an entry that is not a string or an entry over 256 characters answers 503 key grants unavailable, so a failed hook never hides rows the key may read. hippo audit list --op and GET /v1/audit?op= accept team_grant and team_ungrant, for an add-on that records its own grant changes. hippo-memory/server exports assertGrantableScope(scope, op), the check POST /v1/auth/keys/:id/grants runs, so an add-on that grants scopes refuses the same ones with the same text. hippo auth grant refuses a scope over 256 characters too, as POST /v1/auth/keys/:id/grants already did; a longer grant already stored still reads and can still be ungranted.
Recall over HTTP (GET /v1/memories) and MCP (hippo_recall) with no scope named now includes the restricted scopes the key is granted. An admin key, the server's local key and a key with no grants recall as before. Restricted scopes an authResolver returns widen default recall the same way. A named scope still returns that scope only. A grant never opens a personal scope. Rows stay inside the caller's tenant. On a shared store, MCP also stays inside the caller's project, plus user-global rows; HTTP GET /v1/memories takes no project (D18). A store adapter reads the new optional grants on RecallSearchArgs and on the default-deny RecallScopeFilter; one that ignores it returns no granted row. The recall continuity block does not widen yet (D19). Context, assemble and the prompt hook follow later.
hippo-memory/session-text reads the pull requests a session opened and the context blocks the host showed it.createdPullRefs(jsonl) gives the github:// ref of each pull request a Claude Code transcript's successful Bash or PowerShell gh pr create call printed, each once, with a GHES host kept in the ref as its host name without the port. The command splits into segments at &&, ||, ;, |, a newline, (, a Bash backtick, and a { or } that starts a word, but never inside quotes, after an escape or in a heredoc body. A PowerShell here-string body and a comment (a # that starts a word, up to the line end) add nothing, and the text of a $( ) inside double quotes is read as a command of its own, the way the shell reads each of them. A segment is a gh pr create when it starts with those words after any NAME=value words, if, elif, do, then, else, time, ! and, in PowerShell, a $name = or $name= assignment. A segment with --dry-run or --dry-run=true creates nothing and does not count. A call gives refs when it printed from one up to as many distinct pull URLs as it has gh pr create segments, or any number when such a segment comes after a for, foreach, while or until word. In Bash a done ends that loop; in PowerShell nothing does. A result that holds gh's a pull request for branch ... already exists: line gives no ref. Each pull URL is read whole, and its path must be /owner/name/pull/N, so a pull path in a query or fragment never counts. seenBlockHashes(jsonl) gives one { promptHash, blockHash } pair for each UserPromptSubmit context attachment, in transcript order. blockHash is the ledger's emitted_hash. promptHash hashes the prompt text the transcript saved, and equals the ledger's prompt_hash for a text prompt. An image, attachment or slash-command prompt can differ (a slash command is saved as its <command-message> text); then match each blockHash against the ledger's emitted_hash. An attachment before the first prompt is not read. Both read the transcript text only and need no store. The subpath also exports githubArtifactRef.
Changed
The unit-test shards split by measured file time, not by file hash. In one CI run the three Ubuntu shards ran 205 s, 235 s and 312 s, because a hash split puts slow files together by chance. tests/timings.json holds each test file's time (environment setup, prepare, collect, setup and test time) from one CI run, and TimeShardSequencer (tests/_time-shards.ts) deals the files to the shards longest first, so each shard gets the same summed time. The Ubuntu test job now runs four shards. The coverage job fails when a shard's blob or time file is missing, reports the slowest shard over the mean, and uploads a fresh test-timings artifact from scripts/ci/timings-reporter.mjs, which also prints the shard totals its run predicts. Refresh the committed file with gh run download <run id> -n test-timings -D tests.
Store port: a new optional group heldWrites holds the four connector writes (writeConnectorEntry, archiveConnectorEntry, markEventSeen and parkDeadLetter) with a required claim. A store sets it when each write takes the claim's hold in the write's own transaction and rejects a held key with DeliveryHeldError (store-kit); runStoreConformance checks it. The four plain methods keep their signatures. A store without heldWrites keeps working: a delivery takes its hold with claimDelivery before it writes. A failed write frees its hold with releaseDelivery.
hippo --version loads 2 modules instead of 639, and hippo --help loads 35 modules instead of 639. The CLI loaded about 640 modules before it read its first argument, because the verb table and cli.ts imported the whole API graph for constants and for the GitHub and codex-wrapper code. --version is now answered by bin/hippo.js (2 dist modules), and a verb loads the modules it runs. Several default constants moved to base/util/limits.ts; each keeps its old export. Timed with the same launcher on both sides (node <dir>/bin/hippo.js, merge base against this branch, 40 interleaved runs, a busy PC where bare node took 80 ms): --version median 1287 ms before and 240 ms after, best run 911 ms before and 51 ms after; --help median 1416 ms before and 177 ms after. npm run build now ends with scripts/checks/check-cli-start.mjs, which fails when hippo --version or hippo --help loads more dist modules than their ceilings.
A PR runs the Linux jobs and one Windows lane; master, release tags and a nightly run every job. A PR no longer runs node-floor, the macOS and Windows suites, the Windows token-eval jobs or the Windows hermes job. Its windows-pr job runs the test files in scripts/ci/windows-owners.json (host, hooks, ACL, junction and process owners, the codex wrapper test for the Windows .cmd shim, and summaries-batch-children.test.ts). The micro-eval job runs on a PR only when the new paths job finds a changed lockfile, migration, ci.yml, file in the micro-eval load trace (scripts/ci/micro-eval-trace.mjs), or a file added, removed or renamed in a traced folder. A file the PR deletes or renames counts when the trace of the base commit held it, so deleting the fixtures folder still runs the job. The trace reads each command of the job from the YAML run values, with repo-relative entry paths, and a command it cannot trace (also node --test or node -e) makes the job run. A PR that touches the hook installer (also init.ts), the hook launcher or the hook scripts runs two Windows hook cases of the harness (scripts/ci/hook-harness-cases.json, started also by a change to that list or to hook-harness.mjs) in token-eval-hooks-windows.yml; the whole Windows harness stays in the full matrix. A called workflow sees its caller's event, so npm-publish.yml runs every job with no new input. nightly.yml runs ci.yml and token-eval.yml on a schedule and opens an issue when one fails. release-rehearsal.yml runs the same calls and npm run prepublishOnly on a rehearse-* tag, with no publish, and fails when a job of the pinned full set (scripts/ci/full-matrix.json) did not run or was skipped. node scripts/ci/job-graph.mjs prints the job set for each event, and tests/scripts/ci-job-graph.test.ts pins it. yaml is a new dev dependency for that script.
Fixed
summaries-batch-children.test.ts seeds its rows without writing 867 markdown mirror files. The test reads rows only, and on a Windows runner it took 6.1 s against its 5 s limit. It now writes the rows in one transaction with writeEntryDbOnly, the row writer writeEntriesTogether calls, and keeps every check.
On the built-in SQLite store, a Slack or GitHub delivery whose write fails holds nothing. The webhook took its delivery hold in its own commit, then wrote. If the write failed and the hold could not be freed, the hold stayed, and every GitHub redelivery of that body answered 409, so the event was lost. The hold now commits with the write in one store transaction, so a failed write leaves no hold and a retry goes through.
Security
A shared store no longer copies rows into the operator's own global store. A store whose config.json sets "sharedStore": true now has no global write target. hippo sleep and POST /v1/sleep on it share nothing. hippo share, hippo share --auto, hippo peers and hippo sync in a shared folder, and hippo_share and hippo_peers over stdio MCP, now refuse and say the store is shared. A Context whose reach is marked shared gets the same. Promote on a shared store still promotes in place.