feat(hub): adopt shared agent inventory API - #10
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8acc98e40a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df330c601b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0cce42daf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b52bbcc25d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa3de05a36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85b98d294d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review budget gate: the sixth review window identified a browser history regression in the previous retention fix. A bounded correction is prepared locally: retain separate 1,500-entry recent and historical windows, offer Latest entries, and ignore late historical responses after returning to live activity. All 298 local tests pass. Publication and further automated review are paused pending an explicit babysit budget reset; the PR has not been merged and the primary checkout remains unchanged. |
|
Human approved a fresh remediation budget of at most TWO additional review windows for PR #10: “You can do a couple more babysit rounds on each of those and merge once they’re green. (aka approved)”. Previous six windows remain recorded; this reset starts the explicitly bounded continuation. The prepared journal correction has 298 passing tests and a 309-test combined-checkout rehearsal. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90f166a193
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1116d39591
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const canonicalFresh = task.freshness?.isStale===false || task.isStale===false; | ||
| if((task.normalizedStatus || task.status)==='running' && canonicalFresh && !cottage.inputRequest) cottage.status='working'; |
There was a problem hiding this comment.
Keep archived tasks offline despite fresh heartbeat data
When the history inventory includes an archived task whose last raw status is still running and whose canonical freshness is false, toCottage() first marks it offline because it is archived, but this override revives it as working and classifyOccupancy() then treats it as live. Such historical tasks consequently render smoke and warm working windows even though cottage.terminal is true; require !task.archived before applying the fresh-running override.
AGENTS.md reference: AGENTS.md:L79-L80
Useful? React with 👍 / 👎.
| ...page, stale: true, error: "Hub task detail temporarily unavailable", | ||
| inputRequest: page.inputRequest ? {...page.inputRequest,stale:true} : null, |
There was a problem hiding this comment.
Apply stale input evidence before enabling Send
When task detail fails but the inventory list remains healthy, this response correctly marks the cached input request stale, yet the browser's ensureActivity() consumes only the page and todos and never applies data.inputRequest to the agent used by capabilityFor(). Fresh evidence after the earlier fix is that the newly returned stale marker is therefore ignored: the conversation form remains enabled and every attempted Send is rejected only after the server repeats the failing detail check. Propagate this input state or include the activity cache's stale state when computing the browser capability.
Useful? React with 👍 / 👎.
|
Review budget gate: both explicitly approved additional windows are complete. The final window identified two new edge cases: archived tasks revived by the canonical-freshness override, and stale activity evidence not disabling browser Send while inventory remains healthy. Both bounded corrections are prepared locally with failing-first regressions; all 302 feature tests and 313 combined-checkout tests pass. The server continues to reject sends when fresh detail cannot be verified. Further publication/review and merge remain paused pending direction; primary files and the running service are unchanged. |
CottageCode can now use AutoHub's shared task inventory so both apps show the same canonical tasks, child relationships, current activity, and available controls. Set
AUTOHUB_HUB_BASEto the Hub API server to select this adapter; plainnpm startretains the existing standalone behavior when no Hub setting is present. Bothnpm startandnpm run onceoptionally load the Git-ignored local.env, so a per-checkout Hub default persists without a global shell export.The adapter honors canonical freshness and model/provider hints for active status, follows every
/v1/taskscursor page, maps list/detail/timeline/checklist data into the existing town presentation, and replaces local SQLite inventory and Claude discovery in Hub mode. A failed refresh preserves the last complete snapshot with an explicit stale state. Activity detail reads leave the enriched inventory snapshot intact, and transient detail failures retain cached journal events with a stale indicator. Older journal reads keep bounded historical windows separate from forward polling. The browser retains independent 1,500-entry historical and recent windows, with a Latest entries action that restores live updates without gaps. OptionalAUTOHUB_HUB_TOKENcredentials stay in the Node server. Result links pass the existing credential-rejecting URL normalizer before populating artifact shelves, and original requests retain the public length limit. User-submitted messages refresh canonical identity, freshness, and capabilities before delivery, with attention-version checks for replies and existing receipt deduplication preserved.Validation:
npm test: 300 passing tests, including pagination, canonical identities, stale snapshot recovery, credential handling, controls, and standalone behavior..envloading, shell-variable precedence, and standalone behavior without the file.git diff --checkpassed; branch is based on currentorigin/main.No breaking changes to the feed contract or standalone defaults. Activation requires an AutoHub server containing the shared
/v1/tasksinventory additions; configuring this user's local launcher is a separate rollout step.