fix(agent): harden sub-agent streamline (PR #582 follow-up)#584
Merged
OisinKyne merged 1 commit intoJun 3, 2026
Merged
Conversation
Addresses review findings #1/#2/#3 on PR #582 "Streamline sub-agents". - agentcrd: document the SeedHostFiles "sub-agents-for-sale only" contract and add TestMarkerOnlyWrittenBySeedHostFiles, locking that the .no-bundled-skills marker is written only by SeedHostFiles and never by the reusable seed primitives (WriteSoul, embed.WriteSkillSubset) a master or objective-only path could route through. [finding #2] - serviceoffercontroller: lower the rendered terminal.timeout 180 -> 80 so a single operation can no longer outlive the 90s lifetime_seconds session; the render test now parses both and asserts timeout <= lifetime_seconds. [finding #3] - agentcrd: add a //go:build integration test that deploys a real CRD sub-agent and verifies the Hermes image honors the contract end-to-end: the marker on the PVC and visible in-pod, the capped hermes-config keys (lifetime_seconds/max_turns/reasoning_effort/disabled_toolsets), and a behavioral bundled-skills-skipped signal. Skips gracefully without a cluster. [finding #1] - plans/sell-agent-perf.md: post-review hardening section and corrected measured figures (SOUL.md 2128 -> 1460 bytes ~370 tok; 177 addresses preserved across 8 reference files).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up hardening for #582 ("Streamline sub-agents"), based on
oisin/sell-agent-streamlineso it can merge into that branch before #582 lands. Addresses three review findings; no behavior from #582 is reverted — this tightens the contract and adds the coverage that was missing.Changes
#2 — make the "sub-agents only" marker invariant enforced, not just convention.
The
.no-bundled-skillsmarker is written unconditionally insideSeedHostFiles. It's safe today because all callers are sub-agent paths and the master seeds viainternal/hermes, but nothing guarded it. Added a doc-contract onSeedHostFilesplusTestMarkerOnlyWrittenBySeedHostFiles, which proves the marker is written only bySeedHostFiles— never by the reusable seed primitives (WriteSoul,embed.WriteSkillSubset) a master/objective-only path could route through. A future refactor that pushes the write into a shared primitive fails this test first.#3 — fix the
terminal.timeout/lifetime_secondsinversion.The rendered sub-agent config had
timeout: 180(per-operation) larger thanlifetime_seconds: 90(whole session) — a single op was nominally allowed to outlive the session. Loweredterminal.timeoutto 80 (≤ 90, well under the 100s Cloudflare free-tunnel cap). The render test now parses both values and assertstimeout <= lifetime_secondsrather than only checking literals, so the relation is enforced even if the numbers drift.#1 — verify the Hermes image actually honors the streamlined contract.
Existing unit tests only assert our rendered output contains the marker + capped keys; nothing proved
nousresearch/hermes-agent:v2026.5.28respects them. Added a//go:build integrationtest that deploys a real CRD sub-agent viaobol agent newand asserts end-to-end:.no-bundled-skillsmarker on the host PVC path and visible inside the pod;hermes-configkeys (lifetime_seconds: 90,max_turns: 30,reasoning_effort: low,disabled_toolsets: [memory, web]);obol-skillsexternal dir populated while the native bundled-skills dir is absent/empty (chosen over a brittle log-grep on an external image's wording).It
t.Skips gracefully without a cluster, consistent with the rest of the integration suite. The optional in-pod inference exercise is gated onOBOL_LLM_ENDPOINT.Docs.
plans/sell-agent-perf.mdgets a post-review hardening section and corrected measured figures (SOUL.md template 2128 → 1460 bytes / ~370 tok — the earlier "~1050 → ~500 tok" was optimistic; addresses split preserved all 177 unique addresses across 8 reference files, verified by diff).Test evidence
Notes
timeout: 180/lifetime: 300— intentionally untouched: it isn't tunnel-exposed and180 ≤ 300is internally coherent, so User facing ingress #3's tunnel rationale doesn't apply.go test -tags integration -run TestIntegration_AgentContract -v -timeout 15m ./internal/agentcrd/against a cluster fromobol stack up.