Skip to content

refactor: keep inbox and task state within lint limits - #158684

Merged
fuller-stack-dev merged 4 commits into
mainfrom
codex/main-inbox-task-lint-repair
Sep 26, 2026
Merged

fuller-stack-dev merged 4 commits into
mainfrom
codex/main-inbox-task-lint-repair

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Restores the existing source line-limit check for mention/task files over the 700-line limit (713 and702 counted lines). Both failures reproduce in unchanged main code.

User Impact

No user-visible change. Mention presentation, task cleanup, and native JSON numeric coercion retain their existing behavior. No stored-data, schema, or authorization changes.

Why This Change Was Made

This narrow CI repair was explicitly requested as part of the maintainer task to finish and land #157920. It is not an unsolicited refactor.

Move unchanged mention title/excerpt formatting into a focused presentation module and move bulk activity-overlay cleanup into its existing process-state owner. No lint limits, baselines, suppressions, or tests were added.

CI also exposed an unrelated boxed-number assertion on main. We verified a correction, then main independently landed the same operation in 66b812f26e7. This branch incorporates that canonical fix; the progress-snapshot file is no longer in the PR diff.

Evidence

  • Fresh-main line-limit failures reproduced: mention inbox713 and task registry702 counted lines. Exact lint passes after extraction.
  • First PR CI failed lint:no-chained-type-assertions on unchanged main server-chat-progress-snapshot.ts:36. Same focused command reproduced locally; it passes with the correction. The failed run remains retained.
  • Existing Gateway mention entrypoint suites 27/27 before and after, 49.08s baseline /42.85s head (includes worker preparation; not a performance claim).
  • Task restore, prepared-activity, and duplicate-module suites 21/21; all five files passed in57.03s.
  • Existing chat-state suite 45/45 before and after (2.52s/1.45s); six native coercion controls matched the old invocation, including boxed BigInt and Symbol rejection.
  • Targeted boundary and ordinary lint, formatting, diff checks, full core typecheck, and independent AutoReview passed. Fresh full-diff review found no P0–P2 defects.

No release, live service, installed runtime, or enforcement setting was changed. Required CI and native review still govern landing.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 26, 2026 05:54
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Sep 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 2:20 AM ET / 06:20 UTC (Revision 3).

ClawSweeper review

What this changes

The branch moves Gateway mention text formatting and task activity cleanup into focused modules while preserving their existing behavior.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still exceeds the enforced source line limit in both affected files, and no merged replacement owns this narrow, maintainer-requested repair. The prior review reported no findings.

Priority: P3
Reviewed head: 5d3818fd78e76f5c7b6fdc8f31b69a136cf207ce

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow extraction preserves the inspected behavior and addresses a source-proven lint failure with relevant existing coverage.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER-authored internal lint repair has no external-contributor runtime-proof gate. Source inspection shows the existing mention entrypoints and task cleanup still use the same behavior, while the PR reports focused test runs; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal lint repair has no external-contributor runtime-proof gate. Source inspection shows the existing mention entrypoints and task cleanup still use the same behavior, while the PR reports focused test runs; no stored-data contract changes.
Evidence reviewed 7 items Enforced limit: The TypeScript source rule caps counted lines at 700 and skips blank and comment lines; neither affected file has a baseline exception.
Current-main failure: Read-only counts of current main give 713 counted lines for the mention inbox and 702 for task registry state, above the configured limit. The PR head gives 696 and 698 respectively. These counts agree with the PR's reported lint failure; lint itself was not run in this review.
Introduced formatting extraction: The introduced hunk moves the existing title and excerpt expressions to a presentation module and calls them from the same mention entrypoints.
Findings None None.
Security None None.

How this fits together

The Gateway mention inbox turns committed mentions into text shown to clients. The task registry tracks live task activity and clears temporary state when its in-memory view is replaced.

flowchart LR
  A[Mention input] --> B[Mention inbox]
  B --> C[Text presentation]
  C --> D[Gateway client]
  E[Task restore] --> F[Task registry]
  F --> G[Activity cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +17. Total +17 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 4 43 26 +17
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 43 26 +17

Review metrics

Metric Value Why it matters
Counted source lines mention 713→696; tasks 702→698; limit 700 Both files fall below the existing limit without adding a suppression.

Technical review

Best possible solution:

Keep mention presentation and task activity cleanup with their respective owners, then land the repair through the normal lint and Gateway/task validation gates.

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

Yes, from source: the checked current-main files count 713 and 702 lines under the configured 700-line rule. This review did not execute lint.

Is this the best way to solve the issue?

Yes. The extracted expressions and cleanup operation retain their existing callers and state owner, with no competing implementation found.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 837fad120fba.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused internal lint repair with no reported user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal lint repair has no external-contributor runtime-proof gate. Source inspection shows the existing mention entrypoints and task cleanup still use the same behavior, while the PR reports focused test runs; no stored-data contract changes.

Evidence

What I checked:

  • Enforced limit: The TypeScript source rule caps counted lines at 700 and skips blank and comment lines; neither affected file has a baseline exception. (.oxlintrc.json:328, 837fad120fba)
  • Current-main failure: Read-only counts of current main give 713 counted lines for the mention inbox and 702 for task registry state, above the configured limit. The PR head gives 696 and 698 respectively. These counts agree with the PR's reported lint failure; lint itself was not run in this review. (src/gateway/mention-inbox.ts:333, 837fad120fba)
  • Introduced formatting extraction: The introduced hunk moves the existing title and excerpt expressions to a presentation module and calls them from the same mention entrypoints. (src/gateway/mention-inbox-presentation.ts:6, 5d3818fd78e7)
  • Introduced cleanup extraction: The new cleanup uses the same process-state activity map that task registry state exports, cancels its timers, and clears the map as the previous inline code did. (src/tasks/task-registry.process-state.ts:205, 5d3818fd78e7)
  • Existing behavior coverage: Existing mention tests assert the displayed title and flattened excerpt; task retention tests inspect live activity before and after cleanup. (src/gateway/mention-inbox.test.ts:321, 5d3818fd78e7)
  • Area history: Recent merged history ties the mention and task paths to Gateway mention expiry and task retention work. The partial clone did not provide some older objects for a complete introduction trace. (src/tasks/task-registry-state.ts:132, ac9b848d2f0b)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-26T06:01:09.994Z sha ba98de4 :: blocked before merge. :: none
  • reviewed 2026-09-26T06:11:25.368Z sha 869e664 :: needs maintainer review before merge. :: none

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

This narrow lint repair was explicitly requested under the maintainer task to finish and land #157920, after its native gate reproduced these two unchanged-main line-limit failures. It is not an unsolicited refactor. Scope is the four reviewed files only; the maintainer independently inspected the frozen patch and approved the behavior-preserving extraction.

The current PR CI failure is separate: lint:no-chained-type-assertions rejects the existing Math.max(value as unknown as number) in src/gateway/server-chat-progress-snapshot.ts:36. This PR does not change that file, and its line-limit repair is not being represented as a fix for that unrelated baseline error. Required CI still applies; no bypass or rerun-to-green is requested.

@fuller-stack-dev fuller-stack-dev changed the title refactor: keep inbox and task state within lint limits refactor: restore gateway and task lint checks Sep 26, 2026
@fuller-stack-dev fuller-stack-dev changed the title refactor: restore gateway and task lint checks refactor: keep inbox and task state within lint limits Sep 26, 2026
@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) September 26, 2026 06:23
@fuller-stack-dev
fuller-stack-dev merged commit 97d7de5 into main Sep 26, 2026
199 of 200 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the codex/main-inbox-task-lint-repair branch September 26, 2026 06:30
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

I am coordinating the current-main full-lint blocker for native correction gates on #158673 and #158680. On a fresh detached canonical main at 91264b958cf11cda9b166fb134f22ca1c796c14c, pinned oxlint 1.83.0 reproduces the mention-inbox 713/700 and task-registry-state 702/700 errors covered here. #158625 covers the two remaining test-file errors.

I will reuse these existing repairs instead of creating a duplicate. Are you actively landing this PR, or is a native maintainer handoff available? I am independently checking the patch and exact-head evidence. No changes to your branch, review records, checkout, or lease have been made.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

steipete pushed a commit that referenced this pull request Sep 26, 2026
* refactor: keep inbox and task state within lint limits

* fix(gateway): preserve boxed coercion without chained assertions
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
* refactor: keep inbox and task state within lint limits

* fix(gateway): preserve boxed coercion without chained assertions
steipete added a commit that referenced this pull request Sep 27, 2026
* fix: avoid event-loop stalls during channel retention pruning

* test: run LINE webhook ingress with its host database broker

* test(zalo): await durable webhook delivery before assertions

* fix(ci): restore core lint line limits (#158625)

* fix(ci): restore core lint line limits

Share the kernel test environment with fresh per-case copies and remove a redundant session publication map alias. Preserve all assertions, environment values, publication ordering, and stored state contracts.

* test(gateway): keep health monitor fixtures within lint limits

* refactor: keep inbox and task state within lint limits (#158684)

* refactor: keep inbox and task state within lint limits

* fix(gateway): preserve boxed coercion without chained assertions

* refactor(channels): integrate canonical ingress mutation kernels

Integrate the existing mutation extraction from #158628 while retaining the worker-owned prune operation and its prepared input. Preserve the public option type, authority checks, and retention ordering.

* test: join ingress fixtures in native worker pools

* test: include ingress consumers in native batch expectations

* test: route and settle native ingress worker fixtures

* test(channels): preserve ingress cleanup failures

* test(channels): normalize mixed cleanup results

* test(doctor): reuse migration config fixture helper

---------

Co-authored-by: Jason (Json) <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
* fix: avoid event-loop stalls during channel retention pruning

* test: run LINE webhook ingress with its host database broker

* test(zalo): await durable webhook delivery before assertions

* fix(ci): restore core lint line limits (openclaw#158625)

* fix(ci): restore core lint line limits

Share the kernel test environment with fresh per-case copies and remove a redundant session publication map alias. Preserve all assertions, environment values, publication ordering, and stored state contracts.

* test(gateway): keep health monitor fixtures within lint limits

* refactor: keep inbox and task state within lint limits (openclaw#158684)

* refactor: keep inbox and task state within lint limits

* fix(gateway): preserve boxed coercion without chained assertions

* refactor(channels): integrate canonical ingress mutation kernels

Integrate the existing mutation extraction from openclaw#158628 while retaining the worker-owned prune operation and its prepared input. Preserve the public option type, authority checks, and retention ordering.

* test: join ingress fixtures in native worker pools

* test: include ingress consumers in native batch expectations

* test: route and settle native ingress worker fixtures

* test(channels): preserve ingress cleanup failures

* test(channels): normalize mixed cleanup results

* test(doctor): reuse migration config fixture helper

---------

Co-authored-by: Jason (Json) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant