Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.4.23

Publishes `340aecac` (#69): the renderer no longer writes a managed instruction
home larger than it will later agree to read.

The writer was unbounded at `apply.ts:161` while the reader capped every
observation at 256 KiB via `readUtf8RegularFile`, so a flattening adapter could
emit a home it could not subsequently open — wedging its own next run. Only
flattening adapters were affected; splitting homes distribute the identical
payload across separate files and never approach the bound.

Two bounds are now named instead of one constant repeated in three places:
`FOREIGN_INPUT_MAX_BYTES` (256 KiB, unchanged, for input this tool did not
author) and `SESSION_MANAGED_OUTPUT_MAX_BYTES` for files it does author, with
`managedObservationMaxBytes()` as the single decision point. The fragment read
keeps its 4 KiB bound and the cache its 32 KiB.

Concretely, this release is what the codex home is waiting on: station01's
`$HOME/.codex/AGENTS.md` is 273,860 bytes, generated 2026-08-07T14:47:43Z, and
is four sources behind the claude home's 44. It sits above the 256 KiB read cap
and no published version can repair it.

## 0.4.22

Ships the managed Bash-profile fix from issue #65 and task
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hasna/instructions",
"version": "0.4.22",
"version": "0.4.23",
"description": "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
"type": "module",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/output.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function seedConfigs(count: number): { home: string; dbPath: string } {
const dbPath = join(home, "configs.db");
process.env["HASNA_INSTRUCTIONS_DB_PATH"] = dbPath;
resetDatabase();
const db = getDatabase();
const db = getDatabase(dbPath);
for (let i = 1; i <= count; i++) {
createConfig({
name: `Very Long Agent Config ${String(i).padStart(2, "0")}`,
Expand Down Expand Up @@ -101,7 +101,7 @@ describe("configs apply ownership output", () => {
const dbPath = join(home, "configs.db");
process.env["HASNA_INSTRUCTIONS_DB_PATH"] = dbPath;
resetDatabase();
const db = getDatabase();
const db = getDatabase(dbPath);
const claude = createConfig({
name: "Claude Legacy Writer",
category: "rules",
Expand Down
2 changes: 2 additions & 0 deletions src/cli/session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function runCli(args: string[], env: Record<string, string | undefined> = {}) {
encoding: "utf8",
env: {
...process.env,
HASNA_INSTRUCTIONS_API_URL: "",
HASNA_INSTRUCTIONS_API_KEY: "",
...env,
NO_COLOR: "1",
FORCE_COLOR: "0",
Expand Down
Loading