Skip to content

feat(gateway): advertise chat attachment limits on hello-ok - #116188

Merged
omarshahine merged 2 commits into
mainfrom
omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42
Aug 1, 2026
Merged

omarshahine merged 2 commits into
mainfrom
omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42

Conversation

@omarshahine

@omarshahine omarshahine commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The gateway accepts attachments on chat.send, sessions.send, and session-creation initial turns, but never tells clients what it will accept. The real limits are operator-tunable and server-private, so every external client hardcodes a guess that silently disagrees with the server: files get uploaded and rejected after the round-trip, or valid files get blocked locally by a limit that is too tight. Fixes #116144.

Why This Change Was Made

Adds an optional attachments descriptor to hello-ok.policy, next to maxPayload, carrying the two ceilings a client can act on before sending:

"attachments": {
  "maxBytes": 20971520,      // per-attachment decoded ceiling
  "maxImageBytes": 6291456   // effective image ceiling
}

Both values come from one shared resolver (src/gateway/chat-attachment-policy.ts) that the enforcement path also uses, so the advertised numbers cannot drift from what the parser actually rejects.

Design notes:

  • maxImageBytes is the effective minimum, not the raw constant. The configured ceiling is checked first and the image ceiling second, so under a 1 MB mediaMaxMb advertising the 6 MiB image constant would be a lie. It is min(maxBytes, MAX_IMAGE_BYTES).
  • MIME types and per-message counts are excluded. acceptNonImage is true for chat.send but false for agent-content and node events; MIME is sniffed from payload content; image support depends on the resolved model; the text-only offload limit drops rather than rejects. None of that can be stated once per connection, so the server stays authoritative and returns a typed rejection.
  • The inline/offload threshold is excluded. It does not affect acceptance, so it does not serve pre-send validation.
  • Both values are clamped to a representable positive integer. mediaMaxMb is only validated as positive, so a sub-byte value would floor to 0 and an enormous one would overflow to Infinity (serialized as null) — either would violate the frame's integer schema and break the handshake.

Additive, no protocol version bump: the field is optional in the schema, matching how allowedSessionVisibilities and hasMultipleSessionSharingIdentities were previously added to the same policy object. No shipped client validates hello-ok against the schema at runtime — the reference TS client uses HelloOk as a type only, Swift decodes policy as [String: AnyCodable], and Android has no policy model — so additionalProperties: false here is an authoring/codegen guard, not a client-enforced wire contract.

User Impact

No behavior change to the send path; enforcement is untouched. Clients can now reject an oversized file locally with an accurate limit instead of uploading it and waiting for a server error, or guessing a limit that is wrong in either direction.

Documented in docs/gateway/protocol.md and docs/gateway/clients.md, including the trap that policy.attachments is a per-attachment decoded ceiling and never a promise the frame fits: attachments travel as base64, so a 20 MB file is about 26.7 MB on the wire and exceeds the default 25 MiB maxPayload on its own. The docs also note the values are a connection-time snapshot and should be re-read on reconnect.

Evidence

Local (macOS, this checkout):

  • node scripts/run-vitest.mjs src/gateway/chat-attachment-policy.test.ts src/gateway/chat-attachments.test.ts src/gateway/server.hello-attachments.test.ts src/gateway/server-node-events.test.ts — 4 files, 112 tests passed
  • pnpm protocol:check — passed; registry check, schema gen, Swift check, Kotlin gen, since guard, and git diff --exit-code on the committed generated artifacts all clean (no Swift/Kotlin model drift, as expected for a nested policy field)
  • pnpm tsgo — clean
  • pnpm check:test-types — clean
  • oxfmt + scripts/run-oxlint.mjs src/gateway packages/gateway-protocol — clean
  • pnpm build — clean, no [INEFFECTIVE_DYNAMIC_IMPORT] (the new module sits between connect-hello.ts and the runtime barrel)
  • autoreview --mode local (codex / gpt-5.6-sol / high) — two passes; one finding accepted and fixed (the Infinity overflow clamp above), one rejected with the compatibility evidence cited in the previous section

New coverage:

  • src/gateway/chat-attachment-policy.test.ts — configured value, default fallback, invalid-value rejection, sub-byte clamp, overflow clamp, and min() behavior in both directions
  • src/gateway/server.hello-attachments.test.ts — real WebSocket handshake asserting hello-ok.policy.attachments reflects a configured mediaMaxMb, and that the image ceiling clamps down when the configured ceiling is smaller
  • src/gateway/chat-attachments.test.ts — drift guard tying the advertised numbers to the parser's actual accept/reject boundaries

Live gateway proof

Isolated gateway on a scratch state dir (--port 18991 --auth none --bind loopback), driven by an external client built on the shipped reference client (@openclaw/gateway-client) that reads the advertised policy and preflights files locally before any upload.

Run 1 — operator config agents.defaults.mediaMaxMb: 3 (proves the config ceiling is honored and that the image ceiling clamps down below the 6 MiB constant):

hello-ok policy.maxPayload  = 26214400
hello-ok policy.attachments = {"maxBytes":3145728,"maxImageBytes":3145728}

screenshot.png   4MB  ceiling=3MB  -> REJECT locally, never uploaded
screenshot.png   2MB  ceiling=3MB  -> OK to send
report.pdf       4MB  ceiling=3MB  -> REJECT locally, never uploaded
report.pdf       2MB  ceiling=3MB  -> OK to send

Run 2 — default config (proves the two ceilings differ, and shows the base64/maxPayload interaction a client must also check):

hello-ok policy.maxPayload  = 26214400
hello-ok policy.attachments = {"maxBytes":20971520,"maxImageBytes":6291456}

screenshot.png   8MB  ceiling=6MB  encoded=10.7MB  -> REJECT (over attachment ceiling)
screenshot.png   5MB  ceiling=6MB  encoded=6.7MB   -> OK to send
report.pdf       8MB  ceiling=20MB encoded=10.7MB  -> OK to send
archive.zip      24MB ceiling=20MB encoded=32.0MB  -> REJECT (over attachment ceiling)

The 6 MiB image ceiling and 20 MiB other-file ceiling match the enforcement constants exercised by the drift-guard tests, and the 3 MiB run matches the operator's configured value — the numbers a client sees are the numbers the parser enforces.

Rebased on origin/main after the initial review.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime labels Jul 30, 2026
@omarshahine
omarshahine marked this pull request as ready for review July 30, 2026 02:43
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 1:23 PM ET / 17:23 UTC.

ClawSweeper review

What this changes

The PR adds optional hello-ok.policy.attachments size ceilings so Gateway clients can preflight chat attachments using the server’s configured decoded-byte limits.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking correctness finding surfaced. The current branch adds the requested Gateway capability without changing the authoritative attachment parser, documents the connection-snapshot limitation, and has strong after-fix Gateway proof; it should remain open for the normal exact-head automerge gates rather than be closed or sent to repair.

Priority: P3
Reviewed head: 6d504c88a0c7af15f14be6ddf5d400aac8768c33

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real Gateway proof, focused regression coverage, and an additive implementation support a normal mergeable-quality rating.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body contains after-fix isolated Gateway terminal output for both configured and default limits, showing the client reads hello-ok.policy.attachments and rejects oversized files before upload; no private values are exposed in the included transcript.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body contains after-fix isolated Gateway terminal output for both configured and default limits, showing the client reads hello-ok.policy.attachments and rejects oversized files before upload; no private values are exposed in the included transcript.
Evidence reviewed 6 items Shared source of truth: The branch moves the configurable decoded-size limit into a focused resolver and derives both advertised ceilings from it; maxImageBytes is capped by the same image limit enforced by parsing.
Parser remains authoritative: The parser rejects attachments over the configured decoded-size ceiling before MIME processing and separately rejects images over the hydration cap, matching the two values advertised by the new policy.
Additive wire contract: attachments is optional within the existing policy object, while the TypeScript reference client receives HelloOk as a generic response type without invoking a runtime HelloOkSchema decoder on connect.
Findings None None.
Security None None.

How this fits together

Gateway clients receive hello-ok after connecting, before they submit chat or session messages with attachments. This change exposes the parser’s unconditional size ceilings there so clients can avoid futile uploads, while the send path still checks MIME, model support, counts, and final size server-side.

flowchart LR
  Client[Gateway client] --> Hello[WebSocket hello]
  Hello --> Policy[hello-ok attachment policy]
  Config[Operator media limit] --> Resolver[Shared limit resolver]
  Resolver --> Policy
  Resolver --> Parser[Attachment parser]
  Policy --> Preflight[Client upload preflight]
  Preflight --> Request[Chat or session request]
  Request --> Parser
  Parser --> Outcome[Accepted request or server rejection]
Loading

Before merge

  • Resolve merge risk (P1) - policy.attachments is a connection-time snapshot while attachment enforcement reads request-time configuration. A live lowering can still yield a server rejection, and a live raise can cause a client to suppress an upload until reconnect; the branch documents this and keeps the server authoritative.
  • Complete next step (P2) - No repair lane is needed: the reviewed current head has no concrete code or documentation defect, and remaining work is ordinary exact-head merge gating.
Agent review details

Security

None.

PR surface

Source +43, Tests +155, Docs +52. Total +250 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 7 60 17 +43
Tests 3 173 18 +155
Docs 2 56 4 +52
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 289 39 +250

Review metrics

Metric Value Why it matters
Gateway policy contract 2 optional fields added maxBytes and maxImageBytes become externally consumable preflight inputs, so their compatibility and snapshot semantics matter before merge.

Stored data model

Persistent data-model change detected: serialized state: docs/gateway/clients.md. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #116144
Summary: This PR is the open implementation candidate for the structured Gateway attachment-limit capability requested by the linked issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Land with the documented snapshot contract (recommended)
    Accept the bounded reconnect-time staleness because the field is optional, older gateways omit it safely, and the server still validates every request.

Technical review

Best possible solution:

Land the optional two-field policy as a documented connection snapshot, retain parser-side enforcement for all conditional attachment rules, and add any future conditional rejection metadata through a separate typed server error contract rather than overpromising in hello-ok.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds a new optional Gateway capability rather than repairing a defined current failure. The after-fix proof does provide a high-confidence real Gateway handshake and client-preflight validation path.

Is this the best way to solve the issue?

Yes. Sharing the limit resolver between the parser and handshake is the narrowest maintainable design, and the docs correctly avoid representing MIME, model, and per-message rules that cannot be truthfully fixed at connection time.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8b994fc9e170.

Labels

Label justifications:

  • P3: This is a focused client-ergonomics improvement with no change to the existing server-side attachment acceptance path.
  • merge-risk: 🚨 compatibility: The PR adds an optional durable field to the public Gateway handshake policy that mixed-version clients and gateways must tolerate.
  • merge-risk: 🚨 message-delivery: A client acting on a stale handshake snapshot can locally suppress a now-valid upload until reconnect, although the server remains authoritative.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR body contains after-fix isolated Gateway terminal output for both configured and default limits, showing the client reads hello-ok.policy.attachments and rejects oversized files before upload; no private values are exposed in the included transcript.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains after-fix isolated Gateway terminal output for both configured and default limits, showing the client reads hello-ok.policy.attachments and rejects oversized files before upload; no private values are exposed in the included transcript.

Evidence

What I checked:

  • Shared source of truth: The branch moves the configurable decoded-size limit into a focused resolver and derives both advertised ceilings from it; maxImageBytes is capped by the same image limit enforced by parsing. (src/gateway/chat-attachment-policy.ts:15, 6d504c88a0c7)
  • Parser remains authoritative: The parser rejects attachments over the configured decoded-size ceiling before MIME processing and separately rejects images over the hydration cap, matching the two values advertised by the new policy. (src/gateway/chat-attachments.ts:408, 6d504c88a0c7)
  • Additive wire contract: attachments is optional within the existing policy object, while the TypeScript reference client receives HelloOk as a generic response type without invoking a runtime HelloOkSchema decoder on connect. (packages/gateway-protocol/src/schema/frames.ts:141, 6d504c88a0c7)
  • Reconnect and conditional-behavior documentation: The branch docs state that attachment limits are decoded per-attachment ceilings, that frame size still needs maxPayload validation, that conditional MIME/model behavior remains server-authoritative, and that clients must refresh the snapshot on reconnect. Public docs: docs/gateway/protocol.md. (docs/gateway/protocol.md:166, 6d504c88a0c7)
  • Regression coverage and real behavior proof: The branch adds policy-boundary tests, parser parity tests, and a real WebSocket handshake test. The PR body also records two isolated Gateway runs showing configured and default limits drive local preflight decisions before upload; the provided CI context reports the relevant proof and quality checks successful. (src/gateway/server.hello-attachments.test.ts:49, 6d504c88a0c7)
  • Current-main ownership trail: Current main still owns the attachment-limit resolver in chat-attachments.ts; blame attributes the surrounding Gateway parser, handshake policy, and frame-schema lines to the recent area commit by Miorbnli. The requested git log -S provenance search encountered unavailable promisor objects because GitHub DNS was unavailable, so ownership confidence is moderate rather than claiming a complete historical origin. (src/gateway/chat-attachments.ts:178, 0d8b70f39e44)

Likely related people:

  • Miorbnli: Current-main blame assigns the attachment-limit resolver, hello policy block, and adjacent protocol-schema lines to this recent Gateway-area commit. (role: recent Gateway area contributor; confidence: medium; commits: 0d8b70f39e44; files: src/gateway/chat-attachments.ts, src/gateway/server/ws-connection/connect-hello.ts, packages/gateway-protocol/src/schema/frames.ts)
  • galiniliev: The supplied PR discussion records human review by Galin after the compatibility concern was raised, making this the clearest routing contact for the durable wire-contract judgment. (role: reviewer; confidence: medium; files: src/gateway/chat-attachment-policy.ts, src/gateway/server/ws-connection/connect-hello.ts)
  • Peter Steinberger: Local history shows repeated recent maintenance and refactor work in the Gateway protocol and client area, including the gateway-client extraction that owns the reference client contract. (role: recent protocol-area contributor; confidence: low; commits: b1117d98622f; files: packages/gateway-client/src/protocol-client.ts, packages/gateway-protocol/src/schema/frames.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the normal exact-head checks and mergeability gate re-evaluate the branch before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-01T05:55:34.836Z sha f0fed21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T06:34:33.418Z sha f0fed21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T07:05:01.503Z sha f0fed21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T11:32:22.657Z sha f0fed21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T11:39:15.248Z sha f0fed21 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T16:20:02.621Z sha f0ada49 :: found issues before merge. :: [P2] Document the text-only image omission instead of a typed rejection
  • reviewed 2026-08-01T16:26:04.073Z sha f0ada49 :: needs changes before merge. :: [P2] Document the text-only image omission instead of a typed rejection
  • reviewed 2026-08-01T16:47:31.248Z sha 6d504c8 :: needs maintainer review before merge. :: none

@omarshahine
omarshahine force-pushed the omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42 branch from f1d9689 to 4bbe617 Compare July 30, 2026 03:07
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 30, 2026
@omarshahine
omarshahine force-pushed the omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42 branch 3 times, most recently from 8494ea1 to e414ec3 Compare July 30, 2026 21:17
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 30, 2026
@omarshahine
omarshahine requested review from steipete and vincentkoc and removed request for steipete July 31, 2026 02:54
@omarshahine

Copy link
Copy Markdown
Contributor Author

Owner decision: yes, hello-ok.policy.attachments is the intended durable public Gateway contract, not an experiment. Clients should feel safe building preflight validation on it.

Reasoning, for the record:

The field is optional, so every correct client already needs an if (!policy.attachments) fallback to handle older gateways that omit it. That branch is structurally identical to the one a client would need if a future gateway stopped emitting the field. So unlike most protocol commitments, this one stays reversible: removing it later would degrade clients onto a path they already implement rather than breaking them. Shipping it as "experimental" would buy almost nothing, since the entire purpose of the field is for external clients to depend on it.

Scope stays deliberately narrow and I want to keep it that way. maxBytes and maxImageBytes are the unconditional decoded-size ceilings and nothing else. MIME acceptance, per-message counts, and per-model image support depend on the entrypoint, the resolved model, and payload sniffing, so they cannot be stated once per connection and the server stays authoritative on them.

Separately, and not a blocker here: the oversize rejection in chat-attachments.ts currently throws a bare Error with a message string that gets wrapped into MediaOffloadError, with no machine-readable code and no limit in the details. Worth a follow-up to make that a typed error carrying the limit, which would cover the conditional cases this handshake descriptor intentionally does not.

@omarshahine

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. label Jul 31, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue labels Aug 1, 2026
omarshahine and others added 2 commits August 1, 2026 16:35
Clients had no way to learn the gateway attachment ceilings, so external
clients hardcoded guesses that drifted from server enforcement. Publish the
two unconditional decoded-size ceilings on hello-ok policy.attachments from
one shared resolver so advertised values cannot drift from the parser.

MIME acceptance and per-message counts stay server-side: they depend on the
entrypoint, the resolved model, and payload sniffing, so they cannot be stated
once per connection.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 17d6c355-8948-4b48-a936-e08b1c8806ef
@clawsweeper
clawsweeper Bot force-pushed the omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42 branch from f0ada49 to 6d504c8 Compare August 1, 2026 16:41
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Resolve merge risk (P1) - policy.attachments is a connection-time snapshot while attachment enforcement reads request-time configuration. A live lowering can still yield a server rejection, and a live raise ca... (sha=6d504c88a0c7af15f14be6ddf5d400aac8768c33)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@omarshahine

Copy link
Copy Markdown
Contributor Author

@clawsweeper approve

@clawsweeper clawsweeper Bot added clawsweeper:human-review Needs maintainer review before ClawSweeper can continue and removed clawsweeper:human-review Needs maintainer review before ClawSweeper can continue labels Aug 1, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label Aug 1, 2026
@omarshahine
omarshahine merged commit a624ba7 into main Aug 1, 2026
135 of 138 checks passed
@omarshahine
omarshahine deleted the omarshahine-issue-116144-feature-advertise-structured-chat-attac-a3aa42 branch August 1, 2026 18:31
@omarshahine

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 1, 2026
* origin/main: (491 commits)
  feat(gateway): advertise chat attachment limits on hello-ok (#116188)
  fix(ui): preserve full graphemes in session owner initials (#117350)
  refactor(tui): consolidate runtime ownership (#117368)
  fix(update): return failure when dirty checkout blocks update (#117452)
  fix(auto-reply): apply mixed chat directives in one session transaction (#117542)
  refactor(ui): unify channel status and setup controls (#117499)
  fix(doctor): preserve surviving lint selections (#117543)
  fix(media): keep an unquoted MEDIA path with spaces as one media item (#112464)
  refactor(channels): consolidate lightweight plugin discovery (#117541)
  fix(imessage): prevent duplicate messages after delayed sends (#110853)
  refactor(memory): unify authoritative dreaming state and presentation (#117538)
  refactor(agents): consolidate main-session recovery ownership (#117383)
  fix(proxy-capture): make path-based session cleanup atomic (#98852)
  refactor(agents): consolidate compaction and context-engine ownership (#117482)
  fix(gateway): preserve Responses usage details (#117533)
  perf(gateway): skip empty session recovery stores (#117498)
  fix(ci): update canonical Kova performance pin (#117508)
  fix(system-agent): emit the wizard cancel hint once per message (#113731)
  refactor: dedupe secrets runtime snapshot fixtures (#117502)
  test(google): cover ready callback close precedence
  ...
vincentkoc added a commit that referenced this pull request Aug 1, 2026
* origin/main: (325 commits)
  fix(skills): preserve profile in ClawHub command hints (#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (#117556)
  fix(irc): strip markdown from outbound text (#112961)
  refactor(plugins): consolidate registry snapshots (#117561)
  fix(plugins): fail blocked enable commands (#117536)
  test(secrets): dedupe runtime state fixtures (#117563)
  feat(gateway): advertise chat attachment limits on hello-ok (#116188)
  fix(ui): preserve full graphemes in session owner initials (#117350)
  refactor(tui): consolidate runtime ownership (#117368)
  fix(update): return failure when dirty checkout blocks update (#117452)
  fix(auto-reply): apply mixed chat directives in one session transaction (#117542)
  refactor(ui): unify channel status and setup controls (#117499)
  fix(doctor): preserve surviving lint selections (#117543)
  fix(media): keep an unquoted MEDIA path with spaces as one media item (#112464)
  refactor(channels): consolidate lightweight plugin discovery (#117541)
  fix(imessage): prevent duplicate messages after delayed sends (#110853)
  refactor(memory): unify authoritative dreaming state and presentation (#117538)
  refactor(agents): consolidate main-session recovery ownership (#117383)
  fix(proxy-capture): make path-based session cleanup atomic (#98852)
  refactor(agents): consolidate compaction and context-engine ownership (#117482)
  ...

# Conflicts:
#	extensions/xai/realtime-voice-bridge.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
…#116188)

* feat(gateway): advertise chat attachment limits on hello-ok

Clients had no way to learn the gateway attachment ceilings, so external
clients hardcoded guesses that drifted from server enforcement. Publish the
two unconditional decoded-size ceilings on hello-ok policy.attachments from
one shared resolver so advertised values cannot drift from the parser.

MIME acceptance and per-message counts stay server-side: they depend on the
entrypoint, the resolved model, and payload sniffing, so they cannot be stated
once per connection.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 17d6c355-8948-4b48-a936-e08b1c8806ef

* feat(gateway): advertise chat attachment limits on hello-ok

---------

Co-authored-by: Omar Shahine <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Copilot-Session: 17d6c355-8948-4b48-a936-e08b1c8806ef
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (491 commits)
  feat(gateway): advertise chat attachment limits on hello-ok (openclaw#116188)
  fix(ui): preserve full graphemes in session owner initials (openclaw#117350)
  refactor(tui): consolidate runtime ownership (openclaw#117368)
  fix(update): return failure when dirty checkout blocks update (openclaw#117452)
  fix(auto-reply): apply mixed chat directives in one session transaction (openclaw#117542)
  refactor(ui): unify channel status and setup controls (openclaw#117499)
  fix(doctor): preserve surviving lint selections (openclaw#117543)
  fix(media): keep an unquoted MEDIA path with spaces as one media item (openclaw#112464)
  refactor(channels): consolidate lightweight plugin discovery (openclaw#117541)
  fix(imessage): prevent duplicate messages after delayed sends (openclaw#110853)
  refactor(memory): unify authoritative dreaming state and presentation (openclaw#117538)
  refactor(agents): consolidate main-session recovery ownership (openclaw#117383)
  fix(proxy-capture): make path-based session cleanup atomic (openclaw#98852)
  refactor(agents): consolidate compaction and context-engine ownership (openclaw#117482)
  fix(gateway): preserve Responses usage details (openclaw#117533)
  perf(gateway): skip empty session recovery stores (openclaw#117498)
  fix(ci): update canonical Kova performance pin (openclaw#117508)
  fix(system-agent): emit the wizard cancel hint once per message (openclaw#113731)
  refactor: dedupe secrets runtime snapshot fixtures (openclaw#117502)
  test(google): cover ready callback close precedence
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (325 commits)
  fix(skills): preserve profile in ClawHub command hints (openclaw#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (openclaw#117556)
  fix(irc): strip markdown from outbound text (openclaw#112961)
  refactor(plugins): consolidate registry snapshots (openclaw#117561)
  fix(plugins): fail blocked enable commands (openclaw#117536)
  test(secrets): dedupe runtime state fixtures (openclaw#117563)
  feat(gateway): advertise chat attachment limits on hello-ok (openclaw#116188)
  fix(ui): preserve full graphemes in session owner initials (openclaw#117350)
  refactor(tui): consolidate runtime ownership (openclaw#117368)
  fix(update): return failure when dirty checkout blocks update (openclaw#117452)
  fix(auto-reply): apply mixed chat directives in one session transaction (openclaw#117542)
  refactor(ui): unify channel status and setup controls (openclaw#117499)
  fix(doctor): preserve surviving lint selections (openclaw#117543)
  fix(media): keep an unquoted MEDIA path with spaces as one media item (openclaw#112464)
  refactor(channels): consolidate lightweight plugin discovery (openclaw#117541)
  fix(imessage): prevent duplicate messages after delayed sends (openclaw#110853)
  refactor(memory): unify authoritative dreaming state and presentation (openclaw#117538)
  refactor(agents): consolidate main-session recovery ownership (openclaw#117383)
  fix(proxy-capture): make path-based session cleanup atomic (openclaw#98852)
  refactor(agents): consolidate compaction and context-engine ownership (openclaw#117482)
  ...

# Conflicts:
#	extensions/xai/realtime-voice-bridge.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Advertise structured chat-attachment limits on hello-ok

3 participants