Skip to content

feat: multi-agent grouping (0.9.0) - #96

Merged
Astrasu merged 143 commits into
developfrom
feature/multi-agent-namespaces
Oct 23, 2026
Merged

Astrasu merged 143 commits into
developfrom
feature/multi-agent-namespaces

Conversation

@Astrasu

@Astrasu Astrasu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Multi-agent grouping

How many agents share a process becomes a deployment parameter rather than an architectural
commitment.
An agent's code is identical whether it runs alone or beside nineteen others; only
what starts the process differs. A group of one gives today's process isolation, a group of twenty
gives the shared-interpreter memory profile, and moving an agent between groups changes neither its
broker-side consumer identity nor its telemetry identity.

Today one agent means one process, one port, one broker connection and one image, so a platform of
100 agents pays the ~154 MB Python and library baseline 100 times.

The full running record -- every change with the reasoning behind it, including the arguments
that were rejected -- is docs/plans/2026-08-28-multi-agent-grouping-changelog.md.
It is far
beyond GitHub's PR body limit, so this description is a summary. The normative spec is
docs/specs/2026-08-28-multi-agent-grouping.md; where any document disagrees with the spec, the
spec wins. The review of this PR and how each finding was handled is
docs/plans/2026-10-16-pr96-review-fixes.md.


How to review this

389 files, +60,491 / -8,071 against develop (measured 2026-10-22 on 1de7dcd). Please review commit by commit. The first
commits are milestones from the implementation plan, each squashed from a run of consecutive
commits, so every boundary is a tree state that built and passed. The commits after the first merge of
origin/develop address the review, one per step of docs/plans/2026-10-16-pr96-review-fixes.md;
each step names the findings it closes, the tests that hold them and what ran live. Then:

  • 33fb329 (step 22): faults no retry can fix fail early, orphaned agents are unhealthy, telemetry and validator parity (D23, D21/N12, N19).
  • 17f4033 (step 23): the findings of a consuming project's test run on 0.9.0a16 -- the publish route's 403, nats_nak_delay, the late health job, a validator notice.
  • c902df1: the plans name the commits rewritten on 2026-10-21 (history rewrite to remove internal names).
  • af09ac0: merge of origin/develop with chore(claude): review every AI commit for project names #108 (project-name review hook, push guard against the replaced history, CI job "No replaced history").
  • 5321192: the push guard from chore(claude): review every AI commit for project names #108 let an old-history branch through when the command named the repository in double quotes or followed cd <dir> with a line break; fixed, with regression tests in tests/unit/hooks/.
  • 1de7dcd: CHANGELOG -- Breaking 18-21 in order, nats_nak_delay in the upgrade notes.

src/ is identical on 17f4033 and on the head; everything after it is docs, the merge, the hook and its tests.

The single most important reviewer question is invariant C1: an agent's identity must not depend
on which group hosts it. If that is wrong, regrouping becomes a consumer migration and the whole
premise fails. It is pinned by TestConsumerIdentityIgnoresTheDeployment in
tests/unit/agents/clients/io/test_nats_client.py.


What a consumer actually gets

Name each agent, where its files are and the module its declaration lives in:

# agents.toml
[agents.orders]
root   = "agents/orders"
module = "agents.orders.src.main:agent"

[agents.billing]
root   = "agents/billing"
module = "agents.billing.src.main:agent"

The image contains those agents; the deployment decides which of them a process runs:

docker run -e BLUEPRINT_AGENTS=orders,billing my-image   # both in one process
docker run -e BLUEPRINT_AGENTS=orders my-image           # a group of one

python -m blueprint.agents.entrypoint resolves, builds and serves. Each hosted agent owns its
handlers, agent runtime, REST routes (/api/<agent>), AI client, thread pool, caches and broker
connection; the port, the health endpoints and the process are shared.

Agents in one process are isolated, and the barrier is enforced rather than conventional. An
agent resolves its own components, caches and configuration plus the root's shared ones. Four routes
out of an agent were found and closed -- the registry's bare-name fallback, an explicit namespace=
on a view, a dotted configuration key, and one declaration handing two agents the same mutable
object. Config.settings remains the documented escape hatch and logs a WARNING naming the agent.

A standalone agent is unaffected by almost all of this. It runs at the root namespace, with the
same registry names, routes, queue group, durable and service.name. The review fixes restored the
0.8 shapes that had broken: a health check named like a built-in one replaces it again, handler
classes and instances register in declaration order, and asyncio debug mode is no longer on by
default in development. What does change for a standalone agent is in Breaking 11-14 below and in the
CHANGELOG's "Upgrading a standalone agent from 0.8".


Breaking changes

The full list, with migrations, is the Breaking section of [Unreleased] in CHANGELOG.md
(the never-released [0.9.0] section is folded into it). The ones a consumer is most likely to hit:

  1. scheduler_mode is required. "in_process" reproduces today's behaviour; "event" fixes Scheduler fires duplicate cron ticks under multi-replica/multi-worker deployment #73.
  2. A subject-unsafe app_name or nats_queue_group fails at startup instead of being rewritten.
  3. nats_use_jetstream = true is enforced against the server; there is no fallback to Core NATS.
  4. nats_url has no default outside development.
  5. A Core NATS event and a scheduler tick reach one replica, not every one.
  6. Cache keys moved for named caches and for agents in a group -- a cold cache, not an error. A
    standalone agent's default cache keeps its keys.
  7. blueprint.events.unhandled and .duplicate carry agent, not namespace; under Dapr an
    undeclared topic is labelled <undeclared>.
  8. On grouped Dapr one delivery fans out to every agent that declared the topic, and a retry
    asked for by one redelivers to all; startup warns when such an agent runs without dedup.
  9. Four declaration surfaces are deleted (AgentRegistration, RegisteredComponent,
    NamespaceBuilder, with_namespace/with_registration), and ClientBase.subscribe takes
    (topic_callbacks)
    -- third-party transports are affected.
  10. Components are constructed by build(), not by the with_*() call (see "What the code sees
    change" in the CHANGELOG).
  11. A broker fault no retry can fix fails the agent, critical or not (CHANGELOG Breaking 18): a
    durable that filters another subject, a stream the server refuses, a missing grant, a refused
    login or deliver subject on a named connection. Never retried, logged CRITICAL; at startup the
    start fails whatever critical_agents says, after it GET /health/live answers 503 (it was
    always 200). A fault that may heal still never fails liveness.
  12. An orphaned agent takes the pod out, whatever readiness_policy says (Breaking 19): an agent
    latched down gates readiness under every policy, and one whose resume keeps failing or whose
    connection loop gave up (event_client_max_retries) fails liveness until it consumes again.
  13. A failed JetStream delivery comes back after a delay (Breaking 20), for standalone agents
    too: nats_nak_delay defaults to 1 s, 5 s, 15 s, 30 s, then 60 s; 0 restores the immediate
    redelivery of 0.8.
  14. The NATS publish route refuses a tenant's subject with 403 (Breaking 21), and
    operator_routes_enabled = false (process scope) leaves the publish and cache routes out. The
    default stays true.

Rolling back to 0.8 is not free: JetStream durables created by this version, cache entries under
the new keys, grouped REST paths and the new metric labels do not go back by themselves. The
CHANGELOG's "Rolling back to 0.8" section says what to do for each.


Issues

Closes #110
Closes #91
Closes #89
Closes #81
Closes #80
Closes #73
Closes #43
Closes #28
Closes #4

Each verified against the code, not inferred from a commit message:

Issue
#110 Named NATS connections: an agent consumes from connections the deployment supplies at runtime, each with its own account and existing JetStream consumer. Story recorded after implementation, at the review's request.
#91 /status/env returned credentials in clear; masking now covers userinfo, secret query parameters and path segments, and fails closed.
#89 Config passed current_env= where Dynaconf selects with env=, so the selected environment never loaded. Fixed here; the scaffolded Dockerfiles select production through DYNACONF_APP_ENVIRONMENT.
#81 Dapr declared topics never subscribed; GET /dapr/subscribe answered 422 to the sidecar.
#80 tests/integration/ was not run and sat at 28 failures. The unit/integration split is enforced; the integration suite has its own compose stack and is run by hand, not in CI.
#73 Schedulers fired duplicate cron ticks under multiple replicas/workers.
#43 Schedulers started twice -- both causes.
#28 Resilient broker startup and subscription readiness. One criterion is met differently: failure after exhausted retries fails liveness, not only readiness (owner decision D23, Breaking 12 above); recorded on the issue.
#4 AgentBuilder built a model during __init__; it now resolves everything in build().

Related, not closed:


Licence

This PR adds no licence. The LICENSE file added earlier on this branch is removed again, and
pyproject.toml carries no license/license-files: the choice of licence has not been approved by
the responsible owner. Open point for the develop -> main merge: the approval, then the licence
there. The alphas already published from this branch (v0.9.0a1 .. v0.9.0a15) carry MIT in their
metadata, which cannot be changed. README.md still states MIT, as on develop.


Versioning

pyproject.toml is back at develop's 0.8.2 and the CHANGELOG has only [Unreleased], as
AGENTS.md asks: the publish workflow sets the version from the tag. Follow-up issue, not in this
PR: derive the version from git tags (setuptools-scm), so source installs report it too.


Verification

Check On Result
ruff check src tests 1de7dcd clean
ruff format --check src tests 1de7dcd clean, 319 files
mypy src 1de7dcd clean, 123 source files
pytest tests/unit 1de7dcd, CI 3,968 passed, 0 failed, 1 skipped (the empty-parameter test_design_rules case); includes the 35 push-guard tests
CI "No replaced history" 1de7dcd pass
pytest tests/integration (NATS JetStream, NATS accounts broker, Redis, in WSL) 17f4033 (src/ identical to the head) 73 of 73 passed
Live, step 22 against its control 33fb329 durable clash: 8 attempts in 4 s and liveness 200 before, one refusal, CRITICAL and liveness 503 now; a refused grant paused the agent silently before, fails the start now
Live, step 23 against its control 17f4033 first redelivery after 0.00 s before, 1 s and 5 s now; publish to a tenant subject 200 before, 403 now; asbs validate exit 1 before, 0 with a notice now
Push guard (#108) 5321192 18 ways to name the repository: the old hook refused 5, the fixed one 18; live in a Claude Code session with --dry-run, refused and let through as expected
asbs validate against the runtime 2026-10-19 19 cases on fresh scaffolds where the process refuses to start or warns: the new validator reports 19, the old one 1
A fresh scaffold starts unit test asbs setup, then create_app() and the lifespan in production, as the container does
Group image 2026-10-19, step-21 code scaffolded with asbs setup --group plus two agents, built from the branch, Docker health healthy under BLUEPRINT_AGENTS and under a one-group file. Not repeated after steps 22 and 23.

The integration test test_the_broker_counts_it_as_a_redelivery, which failed before the review
fixes too, passes since 17f4033: with nats_nak_delay the attempts are no longer spent before the
test reads num_redelivered.


Known gaps carried forward

  • A disk cache's claim is per process (N13, D22 open): diskcache-rs 0.4.10's set-if-absent is not
    atomic across processes. Deduplication and the in-process tick claim need Redis across replicas
    or app_workers; the docs say so.
  • A named connection whose binding names a missing stream is retried, not refused, and with
    manage_consumer = false a missing consumer is not detected (CHANGELOG, Known issues).
  • The generated handler's event-type check never fires (N18): making it fire stopped every fresh
    scaffold, whose handler has no event type, so it stays as it is until it is decided what the
    generated handler does with one.
  • tests/integration does not run in CI; it is run by hand against its compose stack.
  • Dead letters accumulate on <queue group>.dead-letter with no consumer; draining it is an
    operational task.
  • Generating the CronJob for scheduler_mode = "event" is deferred; the publisher is written by
    hand.
  • The bundled examples are not migrated into groups, by decision.

Raised in the 2026-10-21 re-review, not addressed in this PR (to be decided before a stable
0.9.0, not before the merge into develop):

  • A TenancyError on one named connection fails liveness for the whole process, so one tenant's
    revoked credential restarts every agent and tenant of the pod (D23, to be re-confirmed with this
    blast radius).
  • Liveness goes DOWN on the first failed resume, which a short JetStream recovery after a broker
    restart can outlast.
  • A cancel during the dedup claim (asyncio.to_thread) can leave a marker that release() does not
    see, so a redelivery is acked as a duplicate.
  • The operator routes have no authentication and are on by default; the 403 checks only the calling
    agent's tenants; error bodies name subjects and reasons.
  • Dedup and tick claims run on the loop's default executor, not on the agent's own pool.
  • The telemetry wrappers use private OpenTelemetry SDK attributes under an open version floor.
  • NATSClient keeps growing: Split NATSClient and drop its test-only members (follow-up W11 of #96) #111.

How this was made

Much of the code, tests and documentation in this PR -- including the review fixes -- was written
with Claude Code (Anthropic) under the author's direction. Review it as you would any other code;
the generated parts have had no separate security or licence review.

🤖 Generated with Claude Code

solicho and others added 2 commits September 4, 2026 11:02
….7.0

Fold Unreleased fixes into the 0.7.0 changelog entry

SawwR commented Sep 14, 2026

Copy link
Copy Markdown

⚠️ Version not bumped

pyproject.toml version on this PR branch (feature/multi-agent-namespaces) is 0.7.0, but the target branch (main) is already at 0.8.0. The PR version needs to be bumped above 0.8.0 before merging.


Generated by Claude Code

Astrasu and others added 23 commits September 14, 2026 11:44
…ules

Extracts the design from CLAUDE.md into the repo's spec/plan convention: the
invariants C1-C7, the acknowledgement contract, the selection and fan-out rules
of sec. 7.7, and acceptance criteria for both. Adds the multi-replica warning to
the deployment guide, and the rule that this feature is worked one reviewable
change at a time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ca (#81)

Nothing here is about grouping yet -- these are the defects that block running a
second replica of anything.

P0: subscribe() takes the whole topic map and is managed by the framework, with
background retry, re-subscription after reconnect and subscriptions_ready gating
readiness; in-flight handlers drain before the connection closes; an undecodable
payload is distinguished from a failed dispatch.
P1: Core NATS subscriptions join a queue group derived from the agent, so a
second replica stops processing every message a second time.
P2: a normal return acks and a raised exception naks or terms per the spec
table, on both transports; NO_HANDLER_FOUND acks instead of looping to
max_deliver; unmatched events are counted, not flagged.
P3: ack_wait, max_ack_pending and max_deliver are configurable on a ConsumerConfig
the client owns; the durable carries a deliver group so JetStream shares load;
what the framework gives up on is republished to <queue group>.dead-letter.
Dapr: the subscription document is served, so declared topics actually subscribe
and GET /dapr/subscribe stops answering 422.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The handler chain skips an event whose id and source it has already dispatched,
keyed in the cache under a required TTL. Off unless idempotency_enabled is set,
and a failed dispatch releases its claim so the nak's redelivery still runs.
Duplicates are counted apart from unmatched events, so a redelivery storm does
not read as a namespace subscribed too broadly. The scaffold, the generated
settings and asbs validate all make the author decide.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e ticks once (#43, #73)

scheduler_mode is required and has no default. "event" starts no in-process
timer -- the tick arrives as an ordinary event on the scheduler's own topic, so
the queue group picks one replica and nothing is elected. "in_process" keeps the
timer and claims each tick in the shared cache, so one replica runs it; not a
lease, so there is no renewal task and no takeover bound.

Fixes both causes of #43: a second build() pass no longer starts a second timer,
and SchedulerBase sitting in the REST-API lifespan loop as well as the scheduler
loop no longer starts two AsyncIOScheduler instances per scheduler. Adds
CacheService.claim -- set-if-absent, atomic on both backends.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Clients take a namespace, register under a namespace-qualified name so two can
coexist in one registry, and derive queue group and durable from the namespace
alone -- without which two co-hosted agents on one topic would share a queue
group and each see half their events. Connections are named
<namespace>.<group>.<pod>, so a pod's contents are legible in /connz while
nothing broker-side derives from the pod (C1). One definition of the root
namespace, and one alphabet validated wherever a namespace enters the framework.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Config masking matched whole keys only, so anything with a prefix or suffix
around the secret word came back in clear. Present on develop since 4e6421b and
unrelated to this feature; found and fixed here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phase 0-1. One Config loads the tree; for_namespace hands out a view that reads
<scope>.<key> and falls back to the root. The application owns logging rather
than the library, app_port stays a process-level key, the config loader is
unreachable from agent code, and a project chooses its own environment-variable
prefix. run_app lets a project serve itself from its own settings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phases 2-4. The namespace is ambient -- captured from the scope at the call
site, never named by developer code and never forwarded to a constructor -- so
one declaration can be applied alone or once per namespace. The registry
resolves per namespace with the root as fallback, each namespace gets its own
thread pool, and a cache gains a name with its own store and its own partition
per agent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phases 5-7. Dispatch is indexed on declared event types, wildcard by default,
and each event goes to one agent's handlers; subscriptions are per agent, so two
agents may want the same topic; one transport client is wired per agent and none
for an agent that needs none; each agent's routes mount under its own prefix;
every named cache is managed and probed, not only the default. On Dapr the one
endpoint routes and fans out in the process. A handler may say which agent
runtime should serve an event.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phase 8. The name given in code is the agent's identity and app_name is only
the fallback; any name that cannot identify one agent fails at startup.
GroupConfig resolves which agents a process hosts from a file and the
environment, AppBuilder applies the resolved group one namespace per agent, and
python -m blueprint.agents.entrypoint is the container's command: it resolves,
builds and serves. pyyaml is now declared rather than reached through a
transitive dependency.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phase 8b. Every with_* call is recorded and built in build(), AgentBuilder
records and builds against the agent's own configuration view, and AgentGroup
collects named declarations into one process. The three duplicate declaration
surfaces are deleted (AgentRegistration, RegisteredComponent, NamespaceBuilder,
with_namespace/with_registration). A cache is private to the agent that declared
it, keyed on (namespace, name) with its own directory and Redis prefix; every
health check is attributed to its agent; an agent's own settings file merges
under its scope.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ocuments

AGENTS.md is the file CLAUDE.md has been citing for months and did not exist.
Its design rules now have test guards, which found and fixed real violations.
Four overlapping cache documents became one, rewritten against the code -- which
turned up a 500 in GET /cache/stats, fixed in the same change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phase 9. Spans from namespace invoice carry service.name = "invoice" (C2); a
degraded namespace reports liveness UP, readiness per policy and
blueprint_namespace_up = 0 with its consumers stopped (C3, C4); every path that
stops a namespace serving emits an ERROR carrying that namespace's identity
(C7). Adds blueprint.scheduler.tick_age_seconds and
blueprint.events.dead_lettered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ate it

Phase 10 step 1-2. asbs setup writes a declaration rather than an application:
src/main.py assigns an unbuilt AppBuilder, agents.toml names the agent and its
module, and the Dockerfile's command is the entry point. The same project runs
standalone and hosted. asbs validate reports what a project has not said about
grouping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…at matches

Phase 10 step 3-4. The setup guide covers both paths -- a new project and
migrating an existing single-agent one -- the identity decision to get right
first, what changes and what does not, and the cold cache after the move.
Writing them found defects, fixed in the same changes. The deployment guide is
rewritten against what the feature actually ships.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…omewhere to go (#80)

tests/integration/ was not run by CI and sat at 28 failures asserting on
examples that had been removed, so nothing added there would have meant
anything. The split is now enforced by location, and the example assertions that
still mean something moved to tests/unit/examples/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ect start

An agent can no longer read a neighbour's data by any route the framework
offers, and asbs setup produces a project that starts, tests and validates.

Isolation 1: the registry's bare-name fallback checks ownership, so it reaches
the root and the asking agent and never a neighbour's key.
Isolation 2: _effective_namespace and _cache_owner refuse a view that names
another agent.
Isolation 3: AgentGroup refuses a declaration shared by several agents that
carries mutable state; a zero-argument factory is the way out.
Isolation 4: a scoped get() resolves a dotted key only under the framework's own
prefixes, an allowlist that fails closed.

AgentRuntime is constructed with its name and registered under the qualified key
like every other component, so two agents may share a runtime name.
nats_publish_mode splits publishing from durable consumption, publishable
subjects are declared, and a wildcard publish subject is refused at startup.
env_status on a scoped actuator reports its own scope, not the tree.
token_metrics_enabled reaches ObservabilityConfig; it was read by nothing.

Generator: the scaffolded settings file writes the flat keys the framework
reads, .secrets.toml is the name DEFAULT_SETTINGS_FILES loads, a pyproject.toml
and two tests are generated so setup -> pytest -> validate closes, use_utf8 at
the CLI entry point, and asbs create writes relative imports. Five example
app_name values the broker refuses are renamed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`DEFAULT_SETTINGS_FILES` is `["settings.toml", ".secrets.toml"]` and `asbs
setup` now scaffolds that name, but this repository only ignored the undotted
`secrets.toml` -- so a `.secrets.toml` created here was stageable. Both names
are ignored now, each spelled out rather than `.secrets.*`, which would also
hide the committed `.secrets.toml.example`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The README never mentioned grouping, and its `AppBuilder` example taught three
things the scaffolder no longer writes: `build()` inside `main.py`, a component
instance on the `with_*` line, and the undotted `secrets.toml`.

Standalone is unchanged and says so -- a built module-level `app`, a factory, or
`agent.build(config)`, all still at the root namespace with the same registry
names, routes, queue group, durable and `service.name`. Added beside it: what
`agents.toml` declares, that `BLUEPRINT_AGENTS` decides which agents a process
runs, what each hosted agent owns and what stays shared, that agents in one
process are isolated, and that the name in `agents.toml` is the agent's identity
everywhere else and renaming it later is a consumer migration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Section 12 had 3 of 27 boxes ticked while most of the work behind them had
landed, so the normative document read as though nothing was done. Each
criterion is now verified against the suite and sorted: 18 met, each naming the
test that holds it; 3 built and unit-tested but written to ask for something
only a real broker shows, pointing at tests/integration/; 5 genuinely not done,
each saying why (no CI gate, no CronJob renderer, no fan-out gauge, no
exhaustive detached-task test, no RSS benchmark); and 1 superseded, because
per-namespace filter_subjects became unnecessary when each agent got its own
durable.

All 27 are still present. Nothing was ticked that a test does not hold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CHANGELOG.md carried one entry for #76 and nothing about grouping, which is the
document a consuming service opens to answer "what breaks". The 0.7.0 entry now
states it: what was added, eleven breaking changes in the order a consumer is
likely to hit them, what was fixed with the issue it closes, and what is
knowingly still open.

Assessed against the open issues rather than the commit log. Closed here: #91
(/status/env in clear), #81 (Dapr declared topics never subscribed), #28
(resilient broker startup and subscription readiness -- P0 meets its acceptance
criteria, including event_client_max_retries and event_client_retry_delay), #73
(duplicate cron ticks under replicas), #43 (schedulers starting twice, both
causes), #4 (AgentBuilder building a model during __init__), #80 (the test
split), and #76 ships with it.

Listed as still open rather than claimed: #89 -- Config passes current_env= to
Dynaconf where the selector is env=, so the resolved environment is never
loaded. The configuration layer was reworked substantially here and that defect
survived it, which is worth saying out loud next to a release that rewrites
config. #75 is materially answered by the spec but its ADR is outstanding, and
#32/#35/#36 are enabled but unmeasured.

One claim was checked and dropped before it shipped: an earlier draft said a
group of two or more consuming agents on Dapr fails at build(). It did in phase
6, and phase 7 replaced it with in-process fan-out (test_dapr_fanout.py). The
real caveat is what the entry says instead -- one acknowledgement is shared, so
a retry asked for by one agent redelivers to all.

Version bumped to 0.7.0. The publish workflow overwrites this from the tag, so
it is the tree being honest rather than the source of truth.

The version this commit sets is 0.7.0, and that is wrong: 0.7.0 and 0.8.0 were
already published to PyPI from develop on 2026-09-04 and 2026-09-07. The number
was chosen against a stale `origin/main` and a tag list that had not been
fetched. The merge with develop that follows corrects it to 0.9.0 and restores
the two released entries this changelog was missing. The subject no longer
carries a version so that the log does not advertise a number that was never
this branch's to claim.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI failed on `test_every_directory_is_a_project_or_is_listed` and
`test_no_listed_directory_has_quietly_become_a_project[customer_support_qa]`:
`NOT_PROJECTS` listed `customer_support_qa`, and on a clean checkout there is
no such directory.

`examples/customer_support_qa` was deleted in `ef6cd03`, long before this
branch. Git removes tracked files and nothing else, so its `__pycache__`
directories stayed in the working copy -- nine `.pyc` files and not one tracked
file -- and because `.pyc` is gitignored, `git status` stayed clean and the
husk looked like a real example. The entry's description was written off that
husk, which is why it reads "src/api, src/handlers, src/models and src/services
but no main.py": those are the directories `__pycache__` leaves behind, and
`main.py` was gone because only `main.cpython-314.pyc` remained. The guard was
right and the entry was fiction, so the entry is removed.

`example_directories()` now also requires a directory to hold a file that is
not a `.pyc`. Without that, this test answers one way on a working copy
carrying a husk and another on CI, which is how a green local run shipped a red
remote one. The helper's docstring records the incident and the hash.

Verified against CI's condition rather than assumed: the tree was exported with
`git archive HEAD`, confirmed to contain no `customer_support_qa`, and the
tests run there -- 28 passed. Full unit suite green, ruff and black both clean
on the file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch forked before 0.7.0 and 0.8.0 were cut, so it carried neither. It
also claimed 0.7.0 for itself, chosen against refs that had never been fetched.

Version is 0.9.0. CHANGELOG.md is composed by ownership rather than by picking
a side: develop owns the head, [Unreleased] and the released 0.7.0/0.8.0
entries; this branch owns [0.9.0] and everything from 0.6.4 down, which carries
its fix to the broken link in the 0.3.4 entry that taking develop's file
wholesale had reverted -- the reference guard caught that.

The #76 bullet is dropped from [0.9.0]: it shipped in the real 0.7.0.

Two conflicts needed judgement rather than a side. In api_client.py both
imports are required. In test_app_builder.py both sides added a test class at
the same offset and git interleaved their method signatures; develop's change
is a pure 66-line insertion (TestBuildDocsUrls), re-applied onto this branch's
file so all three classes survive.

One conflict git resolved textually and wrongly: develop's new docs_url,
redoc_url and openapi_url kwargs read self._config, which this branch made
Config | None. They now read resolved_config, the settled process-level
configuration its three neighbouring kwargs already use and the one develop's
own comment asks for. mypy caught it; without the fix build() raises for every
project that passes configuration to build() rather than to the constructor,
which is every grouped agent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Astrasu
Astrasu requested review from pajoma and solicho September 14, 2026 10:05

@solicho solicho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR's base is main, but its head branch is feature/multi-agent-namespaces, not develop.

In this repo, main only ever advances by merging develop into it — every recently-merged feature/fix PR here (e.g. #92, #88, #78) targeted develop; main picks those up via a separate develop→main merge. A feature branch merging straight into main bypasses that path.

Could you retarget this PR to develop (gh pr edit 96 --base develop)? If the intent was actually to cut a release/sync main with develop, the right shape for that is a develop→main PR, not a feature branch standing in for one.

Not a comment on the change itself — I haven't reviewed the diff content, just the base branch.

@Astrasu
Astrasu force-pushed the feature/multi-agent-namespaces branch from d9f3bc1 to 87c4d37 Compare September 14, 2026 10:11
Astrasu and others added 2 commits October 20, 2026 12:51
…iew fixes

A read-only audit compared every user doc, the claude_docs skills, README, AGENTS, CONTRIBUTE and
the grouping spec with the code after steps 1-21; each stale statement was corrected (shared
volume, non-deterministic order, debug mode, disk-cache atomicity, declaration order, the
standalone shape, the agent map). The spec records D23: deterministic NATS faults fail early in
every agent; a missing binding-mode stream or consumer is deferred and listed under Known issues
in the CHANGELOG. The CHANGELOG also describes the validator's new reading of settings. AGENTS.md
cites the concept docs by their full path again.

Plan: docs/plans/2026-10-16-pr96-review-fixes.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Findings M1-M12, S1-S27, N1-N20 with their verification, the steps and what each one did, and the
decisions D1-D23. Open: step 22 (D23, N12, N15, N16, N19), N18 (the generated handler's event
type) and D22 (disk-cache claim across processes).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Astrasu added a commit that referenced this pull request Oct 20, 2026
Findings M1-M12, S1-S27, N1-N20 with their verification, the steps and what each one did, and the
decisions D1-D23. Open: step 22 (D23, N12, N15, N16, N19), N18 (the generated handler's event
type) and D22 (disk-cache claim across processes).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Astrasu

Astrasu commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@SawwR re the version check ("Version not bumped"): thanks -- the version is deliberately not bumped by hand. AGENTS.md ("Versioning and releases")
says the version is the git tag: .github/workflows/publish.yml extracts it from the tag and
rewrites pyproject.toml at build time, and a change only adds a CHANGELOG.md entry under
[Unreleased]. A hand-set version can disagree with the tag that published it.

So this PR now leaves pyproject.toml at develop's 0.8.2 and folds the dated [0.9.0] section
into [Unreleased]; 0.9.0 is whatever tag is cut from it. A follow-up issue will derive the
version from git tags (setuptools-scm) so that source installs report the right version too.

Done in 2b01afa.

Answered with Claude Code; owner decisions by Jan.

…y; telemetry and validator parity

Step 22 of the review-fix plan (D23, D21/N12, D17, N15, N16, N19).

22a (D23): a durable that filters another subject, a stream the server refuses, a grant the
account lacks, and on a named connection a refused login or deliver subject are
DeterministicTransportErrors: never retried, logged CRITICAL with what to change, and fatal in
every agent -- at startup the start fails whatever critical_agents says, after it /health/live
answers 503 naming the agent (spec C3 amended). A JetStream grant refused before startup used to
leave the agent paused for good with nothing logged. A stream another agent of the process created
meanwhile (10058) is a race, not a refusal. Named connections read "failed".

22b (N12, D21): a resume that keeps failing or a connection loop that gave up takes liveness DOWN
until the agent consumes again; an agent latched down gates readiness under every policy.

22c (D17, N16): a service.name only in OTEL_RESOURCE_ATTRIBUTES fails a group's start; an
agent's own otel_service_name reaches its resource. 22d (N15): app_environment reads the
environment that was loaded, with a WARNING when the settings say otherwise. 22e (N19): seven
startup rules are public runtime functions the validator calls; the validator's heartbeat warning
(N17) and the runtime's Dapr shared-topic warning ("false" read as on) had drifted.

Live in WSL against the code before this step: durable clash 8 attempts in 4 s and liveness 200
before, one refusal, CRITICAL and liveness 503 now; a refused grant paused the agent silently
before, fails the start now. Integration 70 of 71 (the pre-existing redelivery-count failure).
New: tests/integration/test_final_faults.py; tenancy faults in test_named_connections.py, whose
D5 tests now use an unreachable broker; a conftest guard fails a test whose app sends SIGTERM.

Plan: docs/plans/2026-10-16-pr96-review-fixes.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A colleague ran all 19 agents of the first consumer on 0.9.0a16 against a local backend.

B1 (owner decision): the NATS publish route, which has no authentication, refuses a subject one
of the agent's tenants owns -- claimed by the connection source, or filtered or delivered to by a
tenant binding -- with 403: an anonymous POST put an event into a tenant's stream, to run under the
tenant's identity. operator_routes_enabled = false (process scope) leaves the publish and the cache
routes out; Dapr's delivery route stays.

B2 (regression of 1d877f2): an unset nats_url outside development is a validator notice, not an
issue -- an image that validates while it is built has none yet, and every build failed.

B3: the periodic health job runs late instead of being dropped (misfire_grace_time=None,
coalesce); dropped runs kept the first startup verdict for 96-217 s. A refresh at the end of
startup was tried and withdrawn: it paused agents whose subscriptions were still being made.

B4 (owner decision: a fixed default): nats_nak_delay, default 1/5/15/30/60 s per redelivery, 0 for
the old behaviour; all attempts used to be spent within 0.3 s. A degraded agent's hand-back stays
immediate. This also fixes the pre-existing test_the_broker_counts_it_as_a_redelivery.

Live in WSL, against 33fb329 as control: first redelivery after 0.00 s before, 1 s and 5 s now;
publish to a tenant subject 200 before, 403 now; asbs validate exit 1 before, 0 with a notice now.
Integration 73 of 73.

Plan: docs/plans/2026-10-16-pr96-review-fixes.md, step 23.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pajoma

pajoma commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Automatically created review report (Claude Code, lead-pr-review). This is a recommendation, not an approval. A human reviewer decides; this comment does not change the PR's review state.

PR Review (re-review): feat: multi-agent grouping (0.9.0) (GitHub #96)

Recommendation: Request changes, for two process items (A1, A2). Once those are done: Approve with comments.
Type: Feature (feature/multi-agent-namespaces → develop)
Change kind: Feature/improvement, bundled with 8 bugfixes
Story: #35 Share the interpreter across agents → epic #32, referenced as "related, not closed". The PR closes #4, #28, #43, #73, #80, #81, #89 and #91.
Reviewed: head 3c25741, compared with the 2026-10-15 review at 81f6bf2. The delta is 154 files, +10.8k/−2.5k.

Short version: the review-fix work is thorough. All three blockers of the 2026-10-15 review are fixed in code, and so are all twelve must-fix items of the 2026-10-16 review, each with a test. I verified this independently by reading the code at 3c25741, not from the fix plan. What remains:

  • a missing story for named connections
  • a PR description that is stale again
  • some new operational risks in the two commits pushed after the description's verification snapshot (fd1e3f5)

Blocking issues

None.

A · Traceability & B · Story

  • ✅ Closes lines are present (8 issues), and the AI disclosure is in the description. Share the interpreter across agents (prefork / multi-tenant host) to reach 40 MB/agent #35/Decide target deployment model: supervisord multi-agent-per-host vs. Kubernetes per-agent Pod+HPA #75 are referenced, and the description says honestly what Share the interpreter across agents (prefork / multi-tenant host) to reach 40 MB/agent #35 still lacks.
  • A1 (Request changes): named connections still have no story.
    • Named connections are a second feature: ConnectionSource, tenant bindings, TenancyError, the publish-route 403 and the site_readings example.
    • No issue requests them, and their behaviour (tenancy faults take liveness DOWN, the publish-route guard) is exactly what needs an accountable requirement.
    • Open a story with acceptance criteria and reference it here. This was already asked on 2026-10-15.
  • A2 (Request changes): the PR description, which is the audit record, is stale again. Commits 3669152 and 3c25741 landed after its verification snapshot fd1e3f5.
    • The verification table is measured on fd1e3f5, not on the head.
    • "Known gaps" still lists as open:
      • the deterministic-fault startup policy (implemented in 3669152)
      • N12 readiness (now liveness DOWN)
      • N19 (done)
      • the failing integration test test_the_broker_counts_it_as_a_redelivery (fixed in 3c25741)
    • "Breaking changes" lacks four changes that CHANGELOG [Unreleased] items 18–21 contain:
      • nats_nak_delay (a new default for standalone users too)
      • faults that can't heal set liveness DOWN
      • orphaned agents gate readiness and liveness
      • the publish-route 403 and operator_routes_enabled
  • Story drift: Add resilient event broker startup and subscription readiness #28's acceptance criterion says "Failure after exhausted retries … leaves the service not-ready". The PR now fails liveness in that case (owner decision D23). Update Add resilient event broker startup and subscription readiness #28's criteria, or note the decision in the issue, so that closing it stays true.
  • Size: 386 files, +60k/−8k, 139 commits. The commit-by-commit structure helps, but please split future work per story.
Acceptance criterion Status Evidence
#35: queue-group eventing, single-leader scheduling, externalized cache Covered, with limits C1 durables and queue groups (TestConsumerIdentityIgnoresTheDeployment); scheduler_mode = "event" plus a tick claim; Redis claim. A disk-cache claim holds per process only (Known issues, D22 open).
#35: 100 agents on 4 GB, no duplicate events or ticks Not covered No benchmark harness (stated in the PR)
#35: documented marginal RAM per agent Not covered Stated in the PR and in CHANGELOG Known issues
#35 task: ADR for the process model Not covered #75 stays open
#73: one tick per cron point with several replicas or workers Covered (event mode, or Redis) Tick slot now from the trigger (scheduler.py:757, test_scheduler.py:764); the disk-cache limit is documented
#91: /status/env masks credentials Covered actuator_api.py:32, :44; test_actuator_api.py:120-142
#89: the selected environment is loaded Covered config.py; test_config_init.py
#28: async broker startup and readiness Covered, with drift (see above) nats_client.py:2460, dapr_client.py:173
#80: unit/integration split enforced Partly covered The split is enforced; tests/integration still never runs in CI
#4, #43, #81 Covered according to the PR and earlier reviews Not re-verified in this pass

C · Code

Status of earlier findings, verified at 3c25741:

Finding Status Evidence
B1/M11: dedup marker kept on cancellation or post-dispatch failure ✅ Fixed handler_chain.py:394-401, event_processing_service.py:181-223; test_event_processing_service.py:368/393/413
B2: payload values in logs ✅ Fixed models/errors.py:10 (loc/type only), dapr.py:96, nats_client.py:2360; _Link fields repr=False
B3: internal names in the tree ✅ Fixed in the tree See F1 for history
M1: duplicate subscriptions on JetStream reconnect ✅ Fixed nats_client.py:3445-3479; test_nats_client.py:1553/1577
M2: failed resume never retried ✅ Fixed nats_client.py:2172-2235; test_nats_client.py:2058-2100
M3/M4: superseded binding, permission violation read as bound ✅ Fixed test_nats_runtime_changes.py:229/248, integration test_named_connections.py:352/399
M5: agent .secrets.toml ✅ Fixed agent_group.py:301, config.py:684. Tested at config level only, not through AgentGroup
M6: Redis clear across agents or the whole DB ✅ Fixed redis_cache_service.py:126-142; test_redis_cache_service.py:398-422
M7: critical-agent typo, scalars, empty group ✅ Fixed group_config.py:480-485, agent_group.py:306-310
M8/M9: grouped tick handler namespace and subject ✅ Fixed scheduler.py:445-446, :461, :577; test_scheduler.py:224-239
M10: curl HEALTHCHECK ✅ Fixed group_Dockerfile:72-75 (Python urllib)
M12: /status/env leaks and 500 ✅ Fixed see #91
W1 OTEL_SERVICE_NAME, W2 tick slot, W4 run-slot leak ✅ Fixed telemetry.py:211-219, scheduler.py:757, nats_client.py:2950-2956
W11: NATSClient size, test-only shims ❌ Still open, and grown see below

Brooks-lint on the delta (src/ only, sampled), Health Score 61/100. No new Critical. The 🟡 items below are worth deciding before the stable release.

🟡 Warning

  • One tenant's fault takes the whole pod down.
    • Symptom: a TenancyError at runtime (a refused login or deliver subject on one named connection) goes through _fail_named → _report_fatal → _on_transport_fatal (app_builder.py:1421-1457). That calls mark_not_live, so liveness returns 503 for the process, and for the root or a standalone agent it raises SIGTERM.
    • Consequence: with M agents × N tenants, one tenant's revoked credential restarts every agent and every tenant. The source hands back the same tenant after the restart, which risks a CrashLoopBackOff. This is deliberate (D23).
    • Remedy: please re-confirm D23 with this blast radius spelled out. The alternative: mark only that binding failed, log CRITICAL, expose a metric and readiness detail, and keep liveness for faults of the agent's own connection.
  • Liveness DOWN on the first failed resume.
    • Symptom: _try_resume calls _report_orphaned at attempt 1 (nats_client.py:2220), and /health/live answers 503 (actuator_api.py:305).
    • Consequence: after a broker restart JetStream often needs some seconds. The backoff (5, 10, 20 s) can outlast a default probe threshold (3 × 10 s), and kubelet restarts every agent of the group. This contradicts D23's own text ("a resume that keeps failing") and its rule that transient faults stay under readiness_policy.
    • Remedy: report orphaned only after N attempts or a grace period, or only for a DeterministicTransportError, and add a test.
  • A cancel during the dedup claim can still lose an event (same class as B1, narrow window).
    • Symptom: claim runs in asyncio.to_thread inside the nats_handler_timeout scope (nats_client.py:3063-3067, handler_chain.py:613-621). If the run is cancelled during that await, the thread still sets the marker, but CLAIMED_CONTEXT_KEY is never set, so release() does nothing (:637).
    • Consequence: with a slow Redis and a short handler timeout, or on shutdown, the redelivery is ACK'd as a duplicate without running.
    • Remedy: mark the claim as pending before the await, or shield it and release after a cancel. Add a test with a slow claim plus a timeout.
  • Unauthenticated operator routes are on by default, and the guard is partial.
    • Symptom:
      • POST …/events/{topic} and the cache routes, including evict, have no authentication, and operator_routes_enabled defaults to true (app_builder.py:63, :1210). This predates the PR.
      • The new 403 checks only the calling agent's tenants (nats_client.py:745-773), so in a group agent A's route can still publish to agent B's tenant subject.
      • The 403 detail (nats.py:192) and the liveness 503 body return tenant subject patterns, stream names and fault reasons to an anonymous caller.
    • Consequence: anyone who can reach the port can publish events or empty an agent's cache, including its dedup markers.
    • Remedy:
  • Dedup and tick claims run on the loop's shared default executor (handler_chain.py:613, :654, scheduler.py:759), not on the agent's own pool.
    • Consequence: one agent's stalled Redis (up to ~5 s per call) starves the other agents' claims, and getaddrinfo for NATS reconnects with them. This contradicts "each agent owns its thread pool".
    • Remedy: loop.run_in_executor(self.executor, …).
  • Telemetry wrappers use private OTel SDK attributes.
    • Symptom: processor._on_ending, exporter._preferred_temporality and exporter._preferred_aggregation (telemetry.py:99, :118), with an open opentelemetry-sdk>=1.38.0 floor.
    • Consequence: an SDK minor release can switch telemetry off silently, because the broad except only logs.
    • Remedy: an upper bound or a contract test.
  • God classes keep growing.
    • Symptom:
      • NATSClient is now 3,051 lines and 158 methods (2,652 and 141 at the last review). nats_client.py is 3,486 lines; _run_delivery is 101 lines.
      • AppBuilder is 1,597 lines and Config 1,239 lines.
      • The "Transitional" test-only members are still there (nats_client.py:591).
    • W11 is marked "out of scope (follow-up issue)", but no such issue exists. Please open it and link it here.

🟢 Suggestion

  • RedisCacheService._owns expects exactly <ns>:<sha256> (redis_cache_service.py:142), so clear(namespace="a:b") silently deletes nothing. Refuse : in namespaces, or document it.
  • namespace_supervisor.py:41,244 hard-imports SessionsBus despite having a Consumer protocol.
  • drop_publish_route matches the string route.name == "publish" (nats.py:162). Register the route conditionally instead.
  • validate.py's ProcessSettings and SettingsView still re-implement Dynaconf layering next to Config. N19 shared the rules, not the resolution.
  • CHANGELOG [Unreleased] → Breaking is numbered 18, 20, 21, 19.

Conventions:

  • ruff check, ruff format --check (317 files) and mypy src (123 files) are clean. I re-ran them locally on 3c25741.
  • CONTRIBUTE.md and CLAUDE.md still tell contributors to run black, while CI enforces ruff format.

Tests:

  • pytest tests/unit locally on 3c25741: 3,934 collected, 0 failed, 1 skipped (the empty-parameter test_design_rules case). CI is green.
  • tests/integration still does not run in CI. The PR's live runs ("73 of 73" in the 3c25741 message) are self-reported and not re-run here.
  • Missing tests: nats_handler_timeout combined with dedup at the transport level (B1 is tested at service level only); an agent .secrets.toml through AgentGroup; the resume grace period; a slow claim with a timeout.

Dependencies (develop → head):

  • New: opentelemetry-instrumentation-httpx>=0.59b0 (Apache-2.0, pre-release versioning), nats-py[nkeys], which pulls in nkeys and pynacl (Apache-2.0), and pyyaml>=6.0 (MIT).
  • Floors raised: diskcache-rs>=0.4.10 (Apache-2.0) and redis[hiredis]>=8.0.0 (MIT, extras only; a breaking change for consumers pinned below 8, noted in the CHANGELOG).
  • No GPL/AGPL. There is still no lockfile, and every pin is an open >=.

Migration and rollback:

  • ✅ The CHANGELOG has "Upgrading a standalone agent from 0.8" and "Rolling back to 0.8".
  • Missing: nats_nak_delay changes redelivery timing for standalone agents too (0 restores the old behaviour). Add it to the upgrade notes. Note also that it departs from the plan's own "never change existing defaults" rule, as an owner decision.

D · Documentation

  • The tone is professional and consistent. ✅ The version is back at 0.8.2, [0.9.0] is folded into [Unreleased], and the licence is deferred and documented in the PR.
  • Inconsistencies: the PR description (A2), the CHANGELOG numbering, and the black instructions.
  • docs/plans/2026-10-16-pr96-review-fixes.md and the feature changelog are internal process records: reviewer handles, owner decisions, licence-approval status. Consider whether they belong in a public repo, or move them to the wiki.
  • The recommendation of the last review stands: run doc-review separately on the spec and the packaged guides.

F · Liability

  • Secrets: no findings. I pattern-scanned every commit of the PR (139 commits, not only the final diff). All credential-shaped strings are placeholders (PLACEHOLDER-SECRET…, YOUR_API_KEY_HERE, …test-only), and the URLs with userinfo are examples (u:***@host). No .env, .pem, .pfx, .p12 or .secrets.toml files were added.
  • Customer and confidential data: the tree is clean, and the PR adds no new sibling-repository references (the existing ones predate the branch). The message of commit 3c25741 names an internal product and its agent repository. The reviewer accepted this on 2026-10-21, as D1 did for the older commits, so it does not block.
  • Personal data: no findings. Payload logging is fixed (B2), and the fixtures use example.com/example.invalid.
  • Licences:
    • No incompatible dependencies, and no copied code without attribution.
    • The PR drops the MIT classifier that develop has, while README.md still states MIT and there is no LICENSE. For a public repo that is an inconsistent licence statement. It is documented as an open point for develop → main (licence approval by the owner). Please track it in an issue.
  • AI assistance: ✅ disclosed in the description and in the commit trailers. The description states that the generated parts have had no separate security or licence review. That review is still due before a stable 0.9.0, and the operator-route and liveness items above are good starting points.
  • Instructions aimed at reviewers: none found.

G · Repository hygiene (default branch develop, unchanged since 2026-10-15)

Item Status
README ✅ Present
LICENSE ❌ Missing (README claims MIT)
CODEOWNERS ❌ Missing
SECURITY.md ❌ Missing
CONTRIBUTING ✅ CONTRIBUTE.md (formatter instructions outdated)
CHANGELOG ✅ Present
Secret scanning ❌ Disabled, including push protection; no CI step. This repo is public.
SBOM ❌ Not generated
Dependency updates ❌ No Dependabot or Renovate; security updates disabled
SAST / dependency audit ❌ None
Branch protection ❌ develop and main unprotected; rulesets exist but are disabled

Not checked

Internal project names were removed from the history of main, develop and this branch: file
contents and eight commit messages from 2026-08-24 on, so each of those commits has a new SHA and
the release tags moved with them. Author, dates and the files each commit touches are unchanged.

This commit points the plans' 18 references to rewritten commits at the new SHAs, records the
revised decision D1 and adds the step to the feature changelog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Astrasu
Astrasu force-pushed the feature/multi-agent-namespaces branch from 3c25741 to c902df1 Compare October 21, 2026 12:54
pajoma added a commit that referenced this pull request Oct 22, 2026
The README is also the package description on PyPI, where relative links
break. Same form as the badge links in #96, so the two PRs merge cleanly there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the project-name review hook, the replaced-history push guard and the CI job "No replaced history" onto the feature branch. CLAUDE.md: both sides appended sections; kept the branch's sections, then develop's.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pajoma

pajoma commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

🤖 Automatically created review report (Claude Code, lead-pr-review). This is a recommendation, not an approval. A human reviewer decides; this comment does not change the PR's review state.

PR Review (delta check): feat: multi-agent grouping (0.9.0) (GitHub #96)

Recommendation: Request changes. The conditions of the 2026-10-21 re-review are still open (A1, A2), and the branch now conflicts with develop.
Reviewed: head c902df1, against the re-review at 3c25741 (old history).

What changed since the re-review

  • The history rewrite. Its counterpart of the reviewed head is 17f4033. Compared with 3c25741, it differs in 3 documentation files (CHANGELOG.md, one plan, one spec), 13 word-level replacements, and no code. The code assessment of the re-review therefore still applies unchanged.
  • c902df1: documentation in docs/plans/ only.
  • The branch carries no replaced history: 1c2098c is not an ancestor of c902df1.

Still open

  1. A1: named connections still have no story.
    • No issue has been opened since 2026-10-15, and the description references none.
    • Please open one with acceptance criteria (ConnectionSource, tenant bindings, TenancyError, the publish-route 403) and reference it here.
  2. A2: the description is unchanged. It was last edited on 2026-10-20, before the re-review. In addition, its SHAs now point into the replaced history, so they are no longer reachable from this PR:
    • fd1e3f5 (the size line and the verification snapshot)
    • c20cfc1 (the format check)
    • All items listed under A2 in the re-review are still open: the verification table, "Known gaps", and the four missing breaking changes.
  3. Merge conflict with develop. After chore(claude): review every AI commit for project names #108, develop and this branch each add a section to CLAUDE.md, and git merge-tree reports a conflict there. Merging develop in also runs the new "No replaced history" check on this PR for the first time.
  4. Add resilient event broker startup and subscription readiness #28 criteria drift. The issue still says not-ready, while the PR fails liveness (D23). The issue has not been updated since June.
  5. Licence, now concrete. This PR removes the MIT classifier because the licence choice is not approved. chore: add the missing repository hygiene files and checks #109 adds an MIT LICENSE file to develop, and README.md states MIT. Decide once, then align both PRs before either is merged:

Unchanged from the re-review (not blocking)

The 🟡 warnings remain open, because the code has not changed since then:

  • the blast radius of D23
  • liveness DOWN on the first failed resume
  • the cancel window during the dedup claim
  • the operator routes
  • the shared default executor
  • the private OTel attributes
  • the god classes, and the follow-up issue for W11 that has not been opened yet

Not checked

  • CI on the merge with the current develop. It has not run yet because of the conflict.
  • Tests, integration and live runs were not re-run. Since the re-review only documentation has changed.

Astrasu and others added 2 commits October 22, 2026 13:03
The guard let an old-history branch through whenever the command named the repository in double
quotes (cd "C:/..." && git push, git -C "..." push) or as cd <dir> followed by a line break: the
extracted path kept the JSON-escaped quote or the \n, did not resolve, and an unresolved path is let
through. A quoted -C path with a space was not recognised as a push at all. A quoted path is now taken
whole and then unquoted, and a line break ends a bare one.

Regression tests in tests/unit/hooks run a copy of the hook against a throwaway repository with a
replaced root of its own. Of 18 ways to name the repository, the old hook refused 5, the fixed one 18.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_nak_delay

Two points of the 2026-10-21 re-review of #96: item 19 had landed after 21, and the standalone
upgrade notes did not say that nats_nak_delay changes redelivery timing for a standalone agent too
(with nats_max_deliver = 5, about 50 s to the dead letter instead of a fraction of a second).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Astrasu
Astrasu merged commit 1f87d53 into develop Oct 23, 2026
4 checks passed
Astrasu added a commit that referenced this pull request Oct 23, 2026
The only conflict was the contributing link in README.md: develop still named
CONTRIBUTE.md, this branch renames it to CONTRIBUTING.md. Kept CONTRIBUTING.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Astrasu added a commit that referenced this pull request Oct 23, 2026
The Security Scan job of this PR fails once develop is merged in: bandit
reports five Low findings in code that came with #96.

- B105 (hardcoded password) x4: both NATS wildcard matchers,
  subject_is_covered_by() and NATSClient._subject_matches(), named their loop
  variable `token`, and bandit reads any comparison of a `token` with a string
  literal ('>', '*') as a password. Renamed to `segment`; no behaviour change.
- B101 (assert) x1: Config.resolved_settings() checked a view's loader with an
  assert, which `python -O` strips, leaving an AttributeError later. It now
  raises RuntimeError, covered by a new unit test.

No nosec comments and no skipped tests: bandit runs clean with the workflow's
own settings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment