Skip to content

[merge after #11] Profiling - #12

Closed
hjc-puro wants to merge 6 commits into
mainfrom
profiling
Closed

[merge after #11] Profiling#12
hjc-puro wants to merge 6 commits into
mainfrom
profiling

Conversation

@hjc-puro

@hjc-puro hjc-puro commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Aggregates logged times for openai calls and tool calls

@hjc-puro hjc-puro changed the title [merge simple terminal first] Profiling [merge after #11] Profiling Nov 20, 2025
@teknium1 teknium1 closed this Feb 2, 2026
h4x3rotab pushed a commit to Clawdi-AI/hermes-agent that referenced this pull request Apr 10, 2026
h4x3rotab pushed a commit to Clawdi-AI/hermes-agent that referenced this pull request Apr 10, 2026
malaiwah pushed a commit to malaiwah/hermes-agent that referenced this pull request Apr 11, 2026
…arg mismatch' (NousResearch#12) from fix/delegate-workspace-kwarg into main
alt-glitch added a commit that referenced this pull request Apr 28, 2026
Address adversarial review findings:

1. Race condition (#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (#12): git push origin HEAD:main instead of
   bare git push.
alt-glitch added a commit that referenced this pull request Apr 28, 2026
* ci(nix): auto-fix stale npm hashes on push to main

When a PR merges to main with updated package-lock.json or package.json
in ui-tui/ or web/, the new auto-fix-main job detects stale npmDepsHash
values and pushes a fix commit directly to main.

This eliminates the recurring manual hash-bump PRs (#15420, #15314,
#15272, #15244) by reusing the existing fix-lockfiles --apply pipeline.

The fix commit only touches nix/*.nix files, which are outside the push
path filter (package-lock.json / package.json), so it cannot re-trigger
itself.

Closes #15314

* fix(ci): use GitHub App token for auto-fix-main push

GITHUB_TOKEN commits are invisible to workflow triggers (GitHub's
infinite-loop prevention). The auto-fix-main job pushes directly to
main, so the fix commit never triggered downstream nix.yml verification.

Mint a short-lived token via the repo's GitHub App (daimon-nous, APP_ID
+ APP_PRIVATE_KEY secrets) so the push is treated as a real event and
nix.yml fires to verify the corrected hashes.

Tested via workflow_dispatch dry-run: app token minted successfully,
checkout with app token succeeded, fix job correctly gated.

Resolves review feedback from Bugbot (r3144569551).

* ci(nix): rename lockfile check job for required status check

Rename 'check' → 'nix-lockfile-check' so the status check name is
unambiguous when added as a required check on main.

* fix(ci): harden auto-fix-main against races, loops, and silent failures

Address adversarial review findings:

1. Race condition (#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (#12): git push origin HEAD:main instead of
   bare git push.

---------

Co-authored-by: alt-glitch <alt-glitch@users.noreply.github.com>
donald131 pushed a commit to donald131/hermes-agent that referenced this pull request May 2, 2026
* ci(nix): auto-fix stale npm hashes on push to main

When a PR merges to main with updated package-lock.json or package.json
in ui-tui/ or web/, the new auto-fix-main job detects stale npmDepsHash
values and pushes a fix commit directly to main.

This eliminates the recurring manual hash-bump PRs (NousResearch#15420, NousResearch#15314,
NousResearch#15272, NousResearch#15244) by reusing the existing fix-lockfiles --apply pipeline.

The fix commit only touches nix/*.nix files, which are outside the push
path filter (package-lock.json / package.json), so it cannot re-trigger
itself.

Closes NousResearch#15314

* fix(ci): use GitHub App token for auto-fix-main push

GITHUB_TOKEN commits are invisible to workflow triggers (GitHub's
infinite-loop prevention). The auto-fix-main job pushes directly to
main, so the fix commit never triggered downstream nix.yml verification.

Mint a short-lived token via the repo's GitHub App (daimon-nous, APP_ID
+ APP_PRIVATE_KEY secrets) so the push is treated as a real event and
nix.yml fires to verify the corrected hashes.

Tested via workflow_dispatch dry-run: app token minted successfully,
checkout with app token succeeded, fix job correctly gated.

Resolves review feedback from Bugbot (r3144569551).

* ci(nix): rename lockfile check job for required status check

Rename 'check' → 'nix-lockfile-check' so the status check name is
unambiguous when added as a required check on main.

* fix(ci): harden auto-fix-main against races, loops, and silent failures

Address adversarial review findings:

1. Race condition (NousResearch#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (NousResearch#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (NousResearch#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (NousResearch#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (NousResearch#12): git push origin HEAD:main instead of
   bare git push.

---------

Co-authored-by: alt-glitch <alt-glitch@users.noreply.github.com>
bluefishs added a commit to bluefishs/hermes-agent that referenced this pull request May 3, 2026
12 輪 iteration 累積核心可交付物:

1. skill-helper-template/ — Missive helper(已 pilot 部署到 runtime ✅)
   - query.py:純 stdlib,繞 hermes 7 道閘
   - install.sh / adopt.sh:runtime 部署 + 業務 repo 採納自動化
   - missive-skill-patch.md:CK_Missive SKILL.md 直接複製貼上
   - README.md:5/5 採納就緒度表 + 4 步完整解阻塞最小路徑

2. ck-{lvrland,pile,showcase}-bridge-stub/scripts/query.py + skill-patch.md
   3 skill 預製,等 CF Tunnel NousResearch#12-13 上線後 5–10 min 採納

3. ck-observability-bridge-skeleton/scripts/query.py + skill-patch.md
   multi-backend 設計(Loki/Prom/Grafana/Alertmanager),9 actions

4. hermes-integration-final-report.md:12 輪 wrap-up 一頁總覽
5. hermes-acceptance-sop.md:採納後 e2e 驗收(hermes-web :9119 為主入口)
6. commit-organization.md:33 untracked → 6 batches commit 指引

驗證:missive 端到端通過 hermes runtime 75s 取真實業務 query (rag_search 5 公文)。

採納路徑:
  業務 repo session: bash docs/plans/skill-helper-template/adopt.sh <skill> .

Refs: hermes-runtime-blockers-postmortem.md (7 層真因 — 下一 commit)
      hermes-integration-final-report.md (整體狀態)
bluefishs added a commit to bluefishs/hermes-agent that referenced this pull request May 3, 2026
per ADR-0024 (proposed):
- 3 tools functional: lvrland_health / lvrland_query_sync / lvrland_price_trends
- ACTION_HANDLERS 對應 LvrLand /api/v1/ai/query / /api/v1/analytics/price-volume-trends
- tests: 12/12 ✅ (含 stub_http fixture / fallback / error paths / register_all)
- + scripts/query.py helper (Phase 1.5 採納用,待 CF Tunnel NousResearch#12)
- + skill-patch.md:CK_lvrland session 採納步驟

接續 ck-missive-bridge / ck-observability-bridge / ck-showcase-bridge / ck-pilemgmt-bridge
完成 ADR-0020 Phase 1 4 bridge skill 矩陣。

Refs: hermes-agent docs/plans/ck-lvrland-bridge-stub/SKILL.md
Seven74AI pushed a commit to Seven74AI/hermes-agent that referenced this pull request Jun 13, 2026
* ci(nix): auto-fix stale npm hashes on push to main

When a PR merges to main with updated package-lock.json or package.json
in ui-tui/ or web/, the new auto-fix-main job detects stale npmDepsHash
values and pushes a fix commit directly to main.

This eliminates the recurring manual hash-bump PRs (NousResearch#15420, NousResearch#15314,
NousResearch#15272, NousResearch#15244) by reusing the existing fix-lockfiles --apply pipeline.

The fix commit only touches nix/*.nix files, which are outside the push
path filter (package-lock.json / package.json), so it cannot re-trigger
itself.

Closes NousResearch#15314

* fix(ci): use GitHub App token for auto-fix-main push

GITHUB_TOKEN commits are invisible to workflow triggers (GitHub's
infinite-loop prevention). The auto-fix-main job pushes directly to
main, so the fix commit never triggered downstream nix.yml verification.

Mint a short-lived token via the repo's GitHub App (daimon-nous, APP_ID
+ APP_PRIVATE_KEY secrets) so the push is treated as a real event and
nix.yml fires to verify the corrected hashes.

Tested via workflow_dispatch dry-run: app token minted successfully,
checkout with app token succeeded, fix job correctly gated.

Resolves review feedback from Bugbot (r3144569551).

* ci(nix): rename lockfile check job for required status check

Rename 'check' → 'nix-lockfile-check' so the status check name is
unambiguous when added as a required check on main.

* fix(ci): harden auto-fix-main against races, loops, and silent failures

Address adversarial review findings:

1. Race condition (#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (NousResearch#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (NousResearch#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (NousResearch#12): git push origin HEAD:main instead of
   bare git push.

---------

Co-authored-by: alt-glitch <alt-glitch@users.noreply.github.com>
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
* ci(nix): auto-fix stale npm hashes on push to main

When a PR merges to main with updated package-lock.json or package.json
in ui-tui/ or web/, the new auto-fix-main job detects stale npmDepsHash
values and pushes a fix commit directly to main.

This eliminates the recurring manual hash-bump PRs (NousResearch#15420, NousResearch#15314,
NousResearch#15272, NousResearch#15244) by reusing the existing fix-lockfiles --apply pipeline.

The fix commit only touches nix/*.nix files, which are outside the push
path filter (package-lock.json / package.json), so it cannot re-trigger
itself.

Closes NousResearch#15314

* fix(ci): use GitHub App token for auto-fix-main push

GITHUB_TOKEN commits are invisible to workflow triggers (GitHub's
infinite-loop prevention). The auto-fix-main job pushes directly to
main, so the fix commit never triggered downstream nix.yml verification.

Mint a short-lived token via the repo's GitHub App (daimon-nous, APP_ID
+ APP_PRIVATE_KEY secrets) so the push is treated as a real event and
nix.yml fires to verify the corrected hashes.

Tested via workflow_dispatch dry-run: app token minted successfully,
checkout with app token succeeded, fix job correctly gated.

Resolves review feedback from Bugbot (r3144569551).

* ci(nix): rename lockfile check job for required status check

Rename 'check' → 'nix-lockfile-check' so the status check name is
unambiguous when added as a required check on main.

* fix(ci): harden auto-fix-main against races, loops, and silent failures

Address adversarial review findings:

1. Race condition (#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (NousResearch#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (NousResearch#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (NousResearch#12): git push origin HEAD:main instead of
   bare git push.

---------

Co-authored-by: alt-glitch <alt-glitch@users.noreply.github.com>
blank-knight added a commit to blank-knight/QIJI-agent that referenced this pull request Jul 16, 2026
- NousResearch#1 客户端路径硬编码: 改为自动搜索常见位置+GEO_CLIENT_EXE环境变量覆盖
- NousResearch#9 cmd_status误用POST /api/stop探测: 改为无副作用的GET,不再杀任务
- NousResearch#11 push/ai_push的uid为空不拦截: 加前置检查,uid/udid为空时报错退出
- NousResearch#12 表格数据翻倍: querySelectorAll不再匹配.fixed-table-body的克隆tbody
BarnsL added a commit to BarnsL/hermes-agent that referenced this pull request Jul 19, 2026
…s, full-width chat, context meter, perf work

Squash-merge of wip/desktop-categories-20260718 (72fe84f) onto main plus
the purple/hardening-only items, reworked where upstream superseded the
original implementation. Renderer + electron only; the context meter needed
no code (current main is field-aligned with the backend — it was blank due
to zeroed in-process counters + provider 400s, not drift).

Restored from wip/desktop-categories-20260718:
- Session categories: $sessionCategories persistent store + sanitizer +
  create/rename/delete/collapse/move (store/layout.ts), sidebar Categories
  section (session-categories-section.tsx), category membership retention in
  sessionsToKeep, sidebar mount + shared store subscription (index.tsx),
  sidebar.categories.* i18n keys (en/ja/zh/zh-hant/types), and the
  sanitize/move unit tests (session-categories.test.ts).
- Category drag-and-drop REWORKED for upstream's pointer drag session:
  new category-drop-zones.ts registry (live-rect hit test), CategoryDropZone
  stripped of the dead native-HTML5 half, and session-drag.ts now targets
  registered category zones (highlight + file-on-release). The pre-merge
  session-pointer-drag.ts fallback and inline-refs effectAllowed patch
  (CRITICAL NousResearch#16) are superseded by upstream's non-native drag and were not
  ported; upstream's suppressDragClick covers the phantom-click concern.
- System tray (Win/Linux): Tray with Open/Restart/Quit, double-click
  restore, close-to-tray, --hidden boot-to-tray for the login autostart,
  tray-aware window-all-closed, teardown on real quit (electron/main.ts).
  Tray Restart rewired to backendConnectionState.invalidate().
- CV-011 audio timeouts: /api/audio/* 120s ceiling in the hermes:api IPC and
  transcribeAudio/speakText timeoutMs (2026-07-18 discarded-transcription
  incident).
- Sidebar shared-scroll wheel-dead-zone fix: one shared scroll container
  (SCROLL_Y without overscroll-contain + scrollbar-gutter:stable),
  getScrollElement plumbing, virtual list scrollMargin/initialOffset/gap
  handling with VirtualRow memo boundary (showProfileTags preserved),
  cron section loses overscroll-contain.
- Timeline perf: PROMPT_HARVEST_MAX cap, MIN_ENTRIES effect guard, single
  querySelectorAll byId map per compute.
- styles.css compositor perf: transform-only arc-border sweep on a 300%
  ::before, paused arcs behind the closed sidebar pane, opacity-only
  code-card streaming pulse on an inset ::after (+ reduced-motion hide).
- getSessionMessages 60s timeout + hermes.test.ts expectation (RCA 2026-07-09).
- 50-WHYS-SESSION-LATENCY.md (docs).

Restored from purple/hardening:
- Full-width chat: --composer-width 100% + tight aui_thread-content gutters
  (6610204; the 7/14 rebuild regressed to the narrow column).
- session.create/session.resume 120s ACK budgets (63.1s GIL-stall incident),
  threaded through requestGateway timeoutMs at both create sites + resume.
- toChatMessagesAsync cooperative transcript conversion (yield per 150
  messages) + O(1) tool-result backfill index (chat-messages.ts builder
  refactor); cold-resume prefetch now converts cooperatively and hands the
  result to reconcileAuthoritativeMessages.
- Trailing-edge debounce (2.5s) for the per-turn cron-jobs refresh fan-out
  (the cron/messaging session halves are superseded by upstream's batched
  listSidebarSessions call).
- Immediate-first gateway reconnect (delay 0 attempt 0) with 2s
  open-then-die flap guard (primary) and the same backoff shape for
  secondary gateways.
- update-marker onStale breadcrumb (CRITICAL NousResearch#2 / audit S-4): stale
  .hermes-update-in-progress self-heal is now logged.
- stableRepoPaths content-stable identity so project-tree refreshes stop
  respawning git worktree list per repo (perf finding 2026-07-09).
- sameCronJobs signature guard so the 30s jobs poll stops re-rendering the
  sidebar on identical data.
- Markdown EXACT_CACHE_MAX 64 -> 512 for multi-session switch-back (applied
  to upstream's two-tier exact+append design).
- backend-ready READY-token WHY comment (CRITICAL NousResearch#6/NousResearch#9) — the regex itself
  was already upstreamed.
- Codicon ellipsis -> kebab-vertical in env-var-actions-menu and
  assistant-message (consistency with session rows).

Deliberately dropped (superseded by main): session-pointer-drag.ts,
inline-refs writeSessionDrag/effectAllowed, wip session-row drag wiring,
per-id tool diff accessor + fallback subscription, use-session-state-cache
bleed guard, cheap part comparator, tail-first resume, --composer-width JSX
changes (none needed), restart-counter.cjs.

Deliberately dropped (out of scope here): Clear Idle Sessions (FEATURE NousResearch#8 /
CRITICAL NousResearch#12) — its backend half (tui_gateway session.release_idle) is a
Python change; port both halves together in a follow-up. Non-desktop wip
work (hermes_cli/web_server.py conversoar provider, discord adapter thread
gates, root package.json, test_web_server.py) left on the wip branch.

Gates: tsc renderer+electron clean; eslint 0 errors on all 31 changed TS
files; vitest 72/72 targeted (categories/hermes/chat-messages/markdown-
blocks/sidebar) + 20/20 gateway-boot/list-actions/state-cache + electron
455 passed / UI 1619 passed — remaining failures (2 electron POSIX-path,
5 messaging/skills) reproduce identically on pristine main.
@zapabob zapabob mentioned this pull request Jul 21, 2026
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
* ci(nix): auto-fix stale npm hashes on push to main

When a PR merges to main with updated package-lock.json or package.json
in ui-tui/ or web/, the new auto-fix-main job detects stale npmDepsHash
values and pushes a fix commit directly to main.

This eliminates the recurring manual hash-bump PRs (NousResearch#15420, NousResearch#15314,
NousResearch#15272, NousResearch#15244) by reusing the existing fix-lockfiles --apply pipeline.

The fix commit only touches nix/*.nix files, which are outside the push
path filter (package-lock.json / package.json), so it cannot re-trigger
itself.

Closes NousResearch#15314

* fix(ci): use GitHub App token for auto-fix-main push

GITHUB_TOKEN commits are invisible to workflow triggers (GitHub's
infinite-loop prevention). The auto-fix-main job pushes directly to
main, so the fix commit never triggered downstream nix.yml verification.

Mint a short-lived token via the repo's GitHub App (daimon-nous, APP_ID
+ APP_PRIVATE_KEY secrets) so the push is treated as a real event and
nix.yml fires to verify the corrected hashes.

Tested via workflow_dispatch dry-run: app token minted successfully,
checkout with app token succeeded, fix job correctly gated.

Resolves review feedback from Bugbot (r3144569551).

* ci(nix): rename lockfile check job for required status check

Rename 'check' → 'nix-lockfile-check' so the status check name is
unambiguous when added as a required check on main.

* fix(ci): harden auto-fix-main against races, loops, and silent failures

Address adversarial review findings:

1. Race condition (NousResearch#1): Job-level concurrency with cancel-in-progress
   collapses back-to-back pushes; ref: main checkout always gets latest
   branch state; explicit push target (origin HEAD:main).

2. Loop prevention (NousResearch#2): File-whitelist check before commit aborts if
   any file outside nix/{tui,web}.nix was modified, preventing
   accidental self-triggering.

3. Silent infra failures (NousResearch#8): nix-lockfile-check now fails explicitly
   when fix-lockfiles exits without reporting stale status (catches nix
   setup failures, network errors, script bugs that bypass continue-on-error).

4. Commit traceability (NousResearch#11): Auto-fix commits include source SHA and
   workflow run URL in the commit body.

5. Explicit push target (NousResearch#12): git push origin HEAD:main instead of
   bare git push.

---------

Co-authored-by: alt-glitch <alt-glitch@users.noreply.github.com>
MarcoFernstaedt pushed a commit to MarcoFernstaedt/hermes-agent that referenced this pull request Aug 1, 2026
Findings #1 and NousResearch#2, together, because NousResearch#2 makes #1 bypassable: a gate in the
model-tools path is worth nothing while `registry.dispatch()` reaches handlers
without consulting it.

`resolve()` now has a production caller. A non-AUTO tool cannot execute without
an execution capability, and a capability cannot exist without a decision — not
"approved" as a boolean somebody might set early, but a token minted at consent,
bound to the exact call, and destroyed by being used.

Four properties, each with a test that fails without it. Bound to the tool and
an argument fingerprint, so approving one call cannot execute a different one
and mutating arguments between consent and execution invalidates the token.
One-use, so a retry loop cannot turn one approval into several executions.
Short-lived, because consent goes stale. And `consume()` raises rather than
returning a boolean — a caller that forgets to check a boolean executes anyway,
and this is the one check where forgetting must not be survivable.

Fail-closed throughout. A broken permission lookup refuses; `requires_capability`
returns True on any exception; an unreadable trust list trusts nothing; minting
without a `tool_call_id` is refused outright, because a capability that could
match any call is not a capability. Every refusal test asserts the handler ran
**zero** times — a gate that refuses after the side effect is not a gate.

**The default is `observe`, and that is a gap rather than a preference.**
`get_tier()` returns ALWAYS_APPROVAL for unregistered tools — deliberately, so
an unknown tool is never assumed safe — and most tools here were never
registered. Switching straight to `enforce` would refuse nearly every call in
the product, which is an outage, not a safety improvement. `observe` audits
every call that *would* be refused, with its tool name, so the registration
backlog is measurable against real traffic and the switch can be flipped once
the audit goes quiet. This mirrors HERMES_APPROVAL_INTEGRITY_MODE, which exists
for the same reason; both must reach `enforce` for the tier system to mean
anything, and neither is there yet. Enforce mode is fully tested.

Also corrected, per the review: the baseline-failure classification, which I
had called environmental wholesale. Three of them are real defects at baseline
— `atomic_config_write` NameErrors, a SQLite journal-mode assertion, and a jobs
asset-contract failure — and the evidence now says so per failure. And the
rollback procedure, which claimed one merge revert covered a many-commit range;
it now gives a non-destructive runtime pin plus three repository options, with
the history-rewriting one marked as needing explicit approval.

Regression check: tests/tools 8532 passed / 19 failed — the failing set
byte-identical to baseline, so the gate broke nothing.

Still not merged to main. Remaining findings: NousResearch#6 undo wiring, NousResearch#10 Now
composition, NousResearch#11 native resume, NousResearch#12 New Chat, NousResearch#13 free-form clarify, NousResearch#14
approval acknowledgement, NousResearch#15 reconnect, NousResearch#16 readiness coupling, NousResearch#17 sensor
delivery.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nu2Qaq5Y7EScuooGz8co34
MarcoFernstaedt pushed a commit to MarcoFernstaedt/hermes-agent that referenced this pull request Aug 1, 2026
…, coupling

**NousResearch#14 — a card could resolve on a decision the gateway never recorded.**
`approval.respond` answers with how many approvals it resolved, and zero is a
*successful RPC that decided nothing* — the request expired, or was answered
elsewhere. The client read the envelope and closed the card, so the owner
believed they had answered while the agent stayed blocked. Now only a
`resolved >= 1` resolves it, and only an explicit `status: "ok"` resolves a
clarify.

**NousResearch#13 — free-form clarify answers went out as new prompts.** The native path
had a steering step that was a no-op returning true, after which the text was
sent via `prompt.submit`: the question stayed open and the answer arrived as an
unrelated message. Replaced by one `answerClarifyFreeText` that addresses the
request by id natively and walks the menu on the terminal — one method, because
splitting it into "steer, then send" is what let the two halves disagree.

**NousResearch#11 — resume threw the transcript away.** `session.resume` returns
`messages`; `open()` read only the identity fields. A refresh reattached to a
running session and showed an empty feed, so execution continued against a
conversation the owner could no longer see. History is now delivered through an
`onHistory` hook that fires *before* `subscribe()` — ordering is the other half
of the fix, since applying the past after live deltas have landed interleaves
them — and merges through the existing hydration path rather than a second one.

**NousResearch#12 — New Chat did nothing natively.** Both controls rotated a PTY identity
that native mode does not use. The session stayed open, its durable id stayed
in storage, and the next prompt continued the old conversation under a heading
that said it was new. `startNew()` closes the session, clears the profile-scoped
durable id before the rebuild so the effect cannot read a stale one, drops the
live id immediately, and opens fresh without resuming.

**NousResearch#16 — a missing TUI disabled the transport that exists to avoid the TUI.**
The chat-readiness probe asks whether the *TUI* can start, and its verdict also
gated native session creation. Each transport is now gated on its own
prerequisite, and the probe does not run at all under native chat — the banner
it raises describes a dependency native chat does not have.

Gates: typecheck 0, eslint 0, 74 files / 706 frontend tests, build green.

Remaining from the review: NousResearch#6 undo not wired to production, NousResearch#10 Now not
consuming the ranking modules, NousResearch#15 reconnect, NousResearch#17 sensor delivery.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nu2Qaq5Y7EScuooGz8co34
xyshanren added a commit to xyshanren/hermes-agent-cn that referenced this pull request Aug 6, 2026
Phase 4 实施期 K-10 (per sprint plan §5). Sprint 1 (调研期 + Step 0 + Step 1) 已 push
(commit 9a38e9a + 613ce0f + b0c61dc + 943c1f7 + 50f8f22, tag v0.18.0+cn.5).

verify 后端跟 plan 假设 differ 1-2 层 (跟 CAND-084 8-03 22:10 lesson 1:1):
- plan 假设 "加 context_compression.threshold config" → 实际 cli.py:339 已有 `"threshold": 0.50`
  + agent_init.py:1231 读 + :1489 传 → 0 work (1:1 集成已 mature)
- plan 假设 "3 cherry-pick 7f670a0 + 5f84eac + 2d0e96a" → 3 commit 都已在 cn (5 branch contains)
  → 0 cherry-pick work
- plan 假设 "smoke test 长 session 跑通 max_turns 500" → 实际 1 line CN change + 4 静态 source check test

K-10 actual scope (跟 plan spirit 1:1 配对, scope adjust 1d → 0.25d):
1. cli.py:342 "max_turns": 90 → 500 (1 line change, 跟 compression.threshold 0.50 1:1 配对)
2. tests/test_k10_max_turns_and_compression.py 4 静态 source check (跟 test_split_bugs_prevent_regression
   12 个 split bug 同 pattern: AST-style 静态 check, 0 yaml 依赖, 防改回归):
   - test_cli_max_turns_default_500 (K-10 main change)
   - test_cli_compression_threshold_050 (config 集成 regression guard)
   - test_agent_init_reads_compression_threshold_from_config (集成点 1:1 配对)
   - test_max_tail_message_floor_still_8 (cn-specific fix aaa3ee6 regression guard, 跟
     test_split_bugs_prevent_regression NousResearch#12 1:1 配对)

验证:
- 4/4 K-10 test pass (本地)
- 12/12 split bugs regression test pass (本地 baseline 0 降)
- grep 旧名 0 命中 (无 split bug)
- additive 0 改旧 (cli.py 1 line change, agent_init.py / context_compressor.py 0 改)
- K-9 跟 AIMC 冲突风险 high 推 next sprint (跟 plan §13 风险登记 1:1 配对)

跟 mavis 4 件套 1:1 配对:
- 后端先调查再设计: verify 5 候选后端 mature, K-10 scope 0.25d adjust
- Cherry-pick split bug class: 1 commit 0 split, _MAX_TAIL_MESSAGE_FLOOR regression guard
- UX 倒退审计: 现有 happy path 不变, 仅 default 90→500
- 估时前必 verify 引擎能力: K-10 verify 后端发现 plan 假设 1d → 0.25d 差 4x, 跟 8-03 22:10 lesson 1:1

跟 AIMC 4 铁律 1:1:
- 不反向调整 (CN 改 default 不动 upstream config pattern)
- 不写回 upstream (0 push 跟 8-05 阶段批推 1:1, 4 commit 一起 batch)
- 0 corrupt (1 line change, regression guard 防回退)
- fail-fast (跟 batch push + CI 1:1 配对, K-10 commit 后 CI 3 job 必绿)

NO push default (per plan §5.2 step 10 "STOP: 不 push origin, 留 Step 5 阶段批推").
Push 跟 K-6/K-7/K-8 3 commit 一起 batch 推 origin/cn, 收尾 tag v0.18.0+cn.6.
tannyton001-web pushed a commit to tannyton001-web/hermes-agent that referenced this pull request Aug 6, 2026
…cycle

Audit lần 2 (15 findings):
- NousResearch#2 P0: write_entry reset attempts=0 when re-emitting a FAILED entry, so
  MAX_ATTEMPTS dead-letter never fired. Merge now KEEPS attempts for any
  non-terminal existing state.
- NousResearch#3 P1: TOCTOU idempotency — find_by_idempotency_key (unlocked scan) and
  write_entry were separate steps; two concurrent emits with the same key
  both dispatched (reproduced 2x adapter.send). New write_entry_idempotent()
  checks + writes under one global .dedup.lock, skipping when an entry with
  the same key exists under a DIFFERENT envelope_id (terminal or in-flight).
- NousResearch#4 P1: stop() on a non-running watcher clobbered watcher_state.json to
  active=false while the real holder still polled. stop() now only persists
  when actually running.
- NousResearch#9 P2: re-emit hardcoded kind=background_notify, dropping original kind.
- NousResearch#12 P2: install_outbox_watcher's 'will start when loop runs' never re-armed
  — now re-arms on the next loop via call_soon.
@zapabob zapabob mentioned this pull request Aug 12, 2026
oriliz added a commit to oriliz/hermes-agent that referenced this pull request Aug 14, 2026
…lStorage persistence, gateway crash pitfalls

Added pitfalls NousResearch#11-13 from real debugging sessions:
- NousResearch#11: cards omitting session_id in tools/call → host auto-injects
- NousResearch#12: HMR reload wipes in-memory cache → localStorage persistence
- NousResearch#13: gateway crash leaves Electron alive → silent message loss

Also updated file map (chat-messages.ts, contrib/wiring.tsx),
added ui/initialize handshake docs, and expanded verification checklist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants