Skip to content

Fix app and server lint findings - #716

Merged
leynos merged 2 commits into
mainfrom
harden-lint-app-server
Oct 15, 2026
Merged

leynos merged 2 commits into
mainfrom
harden-lint-app-server

Conversation

@leynos

@leynos leynos commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

This branch fixes the selected app and server lint findings while preserving connection, framing and timeout behaviour. It makes supported accessors and constructors constant, names cloned state distinctly, removes private trait aliases and their visibility suppressions, and keeps the deprecated public connection entrypoint by routing internal callers through a documented private handler. Tests cover invalid-frame error propagation and warning context, plus compile-time use of the const app APIs.

This source-fix layer follows client test PR #712 at a6f363c3dfdf6b756c4596f9abaf76893b565bbf and is the parent of connection/fragment PR #717. The assembly timeout fixture is inherited from prerequisite PR #714; this branch does not repeat its change.

Review walkthrough

Validation

  • On candidate 89063bfc0d87583a31eb7aa0746867c045c72312, sequential make check-fmt, make lint (rustdoc, Clippy and Whitaker), make typecheck, make test, make markdownlint and make nixie passed. The test run includes the new trybuild compile-pass case. Logs are under /tmp/*-38f85142-6fec-4b04-a025-f87573dec93b-harden-lint-app-server.out.
  • Historical policy audits were run on the original pre-rebase candidate 486b3e4eb9a223ecd4b1b8599445b2416588d897, not this head. They found the pinned Concordat rust-makefile-baseline and markdown-formatting-baseline audits compliant. rust-build-defaults retained the recorded BD-001/BD-002 conflict between ambient defaults and the selected explicit dev-fast policy (Concordat #153); main-owned-codescene-coverage retained the old pinned CV-005 result addressed upstream by Concordat #203. The selected canon revision was 8a2c99cc36532a8e6db6b1cc366966dc761c6444.

Notes

Other Rust source findings remain assigned to later narrow waves. This PR does not enable the final lint configuration.

References

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: b6d36f76-de8e-4fa7-9752-16a24820ed21

📥 Commits

Reviewing files that changed from the base of the PR and between a6f363c and 486b3e4.

📒 Files selected for processing (19)
  • src/app/builder/codec.rs
  • src/app/builder/config.rs
  • src/app/builder/protocol.rs
  • src/app/builder_defaults.rs
  • src/app/codec_driver.rs
  • src/app/combined_codec.rs
  • src/app/envelope.rs
  • src/app/frame_handling/assembly.rs
  • src/app/frame_handling/backpressure.rs
  • src/app/frame_handling/core.rs
  • src/app/inbound_handler/core.rs
  • src/app/inbound_handler/mod.rs
  • src/app/inbound_handler/tests.rs
  • src/app_data_store.rs
  • src/server/config/binding.rs
  • src/server/connection_spawner.rs
  • src/server/mod.rs
  • src/server/runtime/accept.rs
  • src/server/runtime/mod.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/monotony (auto-detected)
  • leynos/rust-prover-tools (auto-detected)
  • leynos/mapsplice (auto-detected)
  • leynos/whitaker (auto-detected)
  • leynos/mdtablefix (auto-detected)
  • leynos/typos-config-builder (auto-detected)
  • leynos/nixie (auto-detected)
  • leynos/shared-actions (auto-detected)
  • leynos/mxd (auto-detected)

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Summary

  • Make supported accessors and constructors const, and clarify local bindings without changing their documented behaviour.
  • Route internal connection handling through handle_unprepared_connection_result. Retain the deprecated public handle_connection_result as a compatibility wrapper.
  • Add a regression test for invalid-frame handling. Check that it returns InvalidData and logs termination context, the absent correlation ID and decoder error.
  • Replace private server trait aliases with direct AppFactory and Preamble bounds. Give concurrency-test workers distinct store and barrier clones, and remove unchecked integer casts and their Clippy allowances.

The author reports that validation passed on commit 486b3e4eb9a223ecd4b1b8599445b2416588d897. The formal target skipped Kani and Verus because they are unimplemented. Current-head hosted checks and review are still pending. This PR does not enable the final lint configuration.

The assembly timeout fixture comes from prerequisite PR #714. The source-fix layer follows client test PR #712 at a6f363c3dfdf6b756c4596f9abaf76893b565bbf.

Walkthrough

The pull request marks several constructors and accessors as const, clarifies local bindings and builder updates, and replaces private server trait aliases with direct bounds. It routes server connections through an internal unprepared-connection method while retaining the deprecated public wrapper. Tests cover invalid-frame logging and concurrent-store bounds.

Changes

Application and server API

Layer / File(s) Summary
Builder and value construction
src/app/builder/*, src/app/builder_defaults.rs, src/app/codec_driver.rs, src/app/combined_codec.rs, src/app/envelope.rs
Several builder methods and value constructors become const. Builder updates use struct-update syntax, and budget calculations use named clamped values.
Frame budgets and processing
src/app/frame_handling/*, src/app/inbound_handler/core.rs
Frame-budget setup uses map_or_else, and backpressure checks use renamed bindings. The inbound pipeline names codec, reassembly, and assembly values explicitly.
Unprepared connection routing
src/app/inbound_handler/mod.rs, src/app/inbound_handler/tests.rs, src/server/connection_spawner.rs
The handler adds an internal unprepared-connection method and retains the deprecated public wrapper. The server calls the internal method. A test checks invalid-frame errors and warning content.
Server binding and runtime
src/server/config/binding.rs, src/server/mod.rs, src/server/runtime/*
Server implementations use direct AppFactory and Preamble bounds. Runtime code uses Self in type and listener operations, and names retry configuration and worker clones.

Concurrent store test updates

Layer / File(s) Summary
Concurrent test setup and bounds
src/app_data_store.rs
The concurrent store tests clarify worker clones and replace unchecked thread-count casts with a checked conversion.

Priority: ⬇️ Low

Change: Refactor

Merge Risk: ⚪ Minimal · up to 486b3

No actionable issue remains; the PR is mergeable after normal checks.

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

Failed Failed checks: 1 error · 3 warnings

Check name Status Explanation Resolution
Testing (Overall) Error The new invalid-frame test is substantive. It uses a real duplex stream and a decoder error, then checks the returned InvalidData error and the warning context. However, the pull request adds compil… Add a compile-time pass test, registered with the existing UI/trybuild tests, that calls the changed public app and envelope APIs from const contexts and checks their resulting values. Keep the invalid-frame regression test, and add a serve…
User-Facing Documentation Warning Document the new public API capability. The PR changes public WireframeApp::codec, WireframeApp::fragmentation, WireframeApp::memory_budgets, Envelope::new, and PacketParts::new from `pub fn… Add a clear note to docs/users-guide.md that the affected public methods are const fn and can be used in constant evaluation where their arguments and surrounding value construction support it. Include a short example for the public con…
Developer Documentation Warning The pull request changes internal APIs and abstractions without updating docs/developers-guide.md. It adds the crate-private handle_unprepared_connection_result path and routes handle_connection… Update docs/developers-guide.md with the internal connection-handling path, its compatibility relationship to the deprecated public methods, and the direct AppFactory/Preamble server-boundary requirements. Update the relevant design d…
Testing (Compile-Time / Ui) Warning The pull request introduces compile-time API behaviour by changing public WireframeApp::codec, WireframeApp::fragmentation, WireframeApp::memory_budgets, Envelope::new, and PacketParts::new … Add a trybuild pass fixture such as tests/ui/app_const_api.rs, register it in tests/compile_error.rs, and exercise the changed public methods from const functions or const values. Cover the const constructors and the builder methods, pl…
Passed Passed checks: 11 passed
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 89.09% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 55 functions across 19 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Module-Level Documentation Passed Pass the module-level documentation check. The authoritative diff changes 19 existing Rust files and adds no module declarations. Every changed file-level module has a leading //! docstring in both …
Testing (Unit And Behavioural) Passed Accept the testing coverage. The PR adds an async behavioural test that drives the full inbound stream path with a real Tokio duplex stream, verifies InvalidData propagation, and checks the warning …
Testing (Property / Proof) Passed Pass this check. The reviewed diff introduces no new invariant over a broad input range, state space, ordering, or transition set. It mainly changes function constness, local names, equivalent control…
Unit Architecture Passed Pass. The reviewed diff does not introduce a Unit Architecture violation. The changes are lint-oriented renames, const fn annotations, equivalent struct-update syntax, direct trait bounds, and test …
Domain Architecture Passed The pull request does not introduce a domain architecture violation. The authoritative diff contains lint-oriented refactors, naming changes, const fn declarations, equivalent control-flow rewrites,…
Observability Passed Treat this check as passed. The diff is lint and naming cleanup plus const fn and equivalent struct-update changes. The connection handler routing changes from the deprecated public wrapper to `hand…
Title check Passed The title directly describes the main change: fixing selected lint findings in app and server code. No roadmap item or issue reference is required by the provided context.
Description check Passed The description clearly explains the lint fixes, behavioural constraints, regression tests, validation commands, and related pull requests. It is directly related to the changeset.
Full details: Testing (Overall)

Explanation

The new invalid-frame test is substantive. It uses a real duplex stream and a decoder error, then checks the returned InvalidData error and the warning context. However, the pull request adds compile-time API functionality by changing public methods such as WireframeApp::codec, fragmentation, memory_budgets, Envelope::new, and PacketParts::new to const fn. No test covers these methods in a const context. The existing client_const_api test covers only client APIs, so it would still pass if these new const qualifiers were removed.

Resolution

Add a compile-time pass test, registered with the existing UI/trybuild tests, that calls the changed public app and envelope APIs from const contexts and checks their resulting values. Keep the invalid-frame regression test, and add a server-level error-path test if the direct handle_unprepared_connection_result test is not intended to cover the changed server caller.

Full details: User-Facing Documentation

Explanation

Document the new public API capability. The PR changes public WireframeApp::codec, WireframeApp::fragmentation, WireframeApp::memory_budgets, Envelope::new, and PacketParts::new from pub fn to pub const fn, which enables constant-context use. The authoritative diff contains no documentation changes. docs/users-guide.md documents these APIs but contains no const fn, compile-time, or constant-context guidance.

Resolution

Add a clear note to docs/users-guide.md that the affected public methods are const fn and can be used in constant evaluation where their arguments and surrounding value construction support it. Include a short example for the public constructors, and explain any limits for WireframeApp builder values.

Full details: Developer Documentation

Explanation

The pull request changes internal APIs and abstractions without updating docs/developers-guide.md. It adds the crate-private handle_unprepared_connection_result path and routes handle_connection and the server connection spawner through it. It also removes the private WireframeFactory and WireframePreamble helper abstractions and applies AppFactory and Preamble directly. The changed-file inventory contains no developer-guide, design-document, ADR, roadmap, or execplan update. Existing guide text describes the broader prepared-application model, but it does not document the new internal handler path or the changed server binding abstraction.

Resolution

Update docs/developers-guide.md with the internal connection-handling path, its compatibility relationship to the deprecated public methods, and the direct AppFactory/Preamble server-boundary requirements. Update the relevant design document or add an ADR addendum if this routing or boundary change is intended as an architectural decision. Keep any affected roadmap or execplan status current.

Full details: Testing (Compile-Time / Ui)

Explanation

The pull request introduces compile-time API behaviour by changing public WireframeApp::codec, WireframeApp::fragmentation, WireframeApp::memory_budgets, Envelope::new, and PacketParts::new to const fn. The existing trybuild suite covers only client const APIs; tests/compile_error.rs and tests/ui/client_const_api.rs are unchanged, and the only added test is a runtime inbound-handler test. No compile-time test verifies the new app APIs. The warning test uses focused semantic assertions, so a snapshot is not required for that output.

Resolution

Add a trybuild pass fixture such as tests/ui/app_const_api.rs, register it in tests/compile_error.rs, and exercise the changed public methods from const functions or const values. Cover the const constructors and the builder methods, plus the codec accessor through a const function accepting a borrowed WireframeApp. Keep assertions focused on stable values and run the compile-time test target.

Mark constructors const; let values rest.
Name each binding to make its role clear.
Keep frame budgets on their same course.
Route unprepared streams through the new path.
Check each bad frame and warning.
Let the server workers start in step.

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This lint-remediation PR makes targeted constness, naming, type-expression, and visibility changes across app and server code, removes private trait aliases and lint suppressions, and preserves connection framing, timeout, compatibility, and error-reporting behavior with a new invalid-frame regression test.

Sequence diagram for compatibility connection error handling

sequenceDiagram
    participant Server as Server connection spawner
    participant App as WireframeApp
    participant Handler as Internal connection handler
    participant Stream as Connection stream

    Server->>App: build()
    Server->>App: handle_unprepared_connection_result(stream)
    App->>Handler: process connection
    Handler->>Stream: decode and frame input
    alt invalid frame
        Stream-->>Handler: framing error
        Handler-->>App: io::Result error
        App-->>Server: error
        Server->>Server: warn connection task error
    else valid frames
        Handler-->>App: Ok(())
        App-->>Server: success
    end
Loading

Sequence diagram for preamble timeout handling

sequenceDiagram
    participant Server as Connection spawner
    participant Timeout as Tokio timeout
    participant Stream as TCP stream
    participant Preamble as read_preamble

    Server->>Timeout: timeout(limit, read_preamble(stream))
    Timeout->>Preamble: read_preamble(stream)
    alt preamble completes
        Preamble-->>Timeout: Result preamble and leftover
        Timeout-->>Server: preamble result
    else timeout expires
        Timeout-->>Server: elapsed error
        Server->>Server: timeout_error()
        Server-->>Server: return decode error
    end
Loading

Flow diagram for per-connection codec and assembly state

flowchart TD
    A[Accepted connection] --> B[clone frame codec]
    B --> C[Create CombinedCodec]
    C --> D[Create Framed stream]
    D --> E[Reassemble fragments]
    E --> F[Assemble message]
    F --> G[Reset deserialization failure counter]
    F --> H[Propagate assembly error]
Loading

File-Level Changes

Change Details Files
Preserve connection error propagation and diagnostics while separating the deprecated public API from internal connection handling.
  • Added a documented private unprepared-connection handler and routed server callers through it.
  • Retained the deprecated fallible public entrypoint as a compatibility wrapper.
  • Added an invalid-frame regression test covering returned error kind and warning context.
  • Renamed connection-local cloned and pipeline state to clarify ownership and processing stages.
src/app/inbound_handler/mod.rs
src/app/inbound_handler/core.rs
src/app/inbound_handler/tests.rs
src/server/connection_spawner.rs
Remove lint findings from server configuration and timeout/task code without changing runtime behavior.
  • Replaced private factory/preamble helper traits with direct AppFactory and Preamble bounds.
  • Simplified preamble timeout conversion while retaining timeout errors and asynchronous task handling.
  • Clarified bindings and self-qualified constructors across server runtime code.
src/server/config/binding.rs
src/server/connection_spawner.rs
src/server/mod.rs
src/server/runtime/accept.rs
src/server/runtime/mod.rs
Apply const-correctness and naming cleanups across app builders, codecs, framing, and state-management code.
  • Made supported accessors, constructors, and pure helpers const.
  • Renamed clamped values, assembly state, memory budgets, and worker/test bindings to distinguish source and derived state.
  • Replaced explicit type names with Self where appropriate and removed test-only cast lint suppressions through typed ranges.
src/app/builder/codec.rs
src/app/builder/config.rs
src/app/builder/protocol.rs
src/app/builder_defaults.rs
src/app/codec_driver.rs
src/app/combined_codec.rs
src/app/envelope.rs
src/app/frame_handling/assembly.rs
src/app/frame_handling/backpressure.rs
src/app/frame_handling/core.rs
src/app_data_store.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos added this pull request to stack #715 September 24, 2026 05:46
@leynos
leynos marked this pull request as ready for review September 24, 2026 06:02

@sourcery-ai sourcery-ai Bot 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.

Sorry @leynos, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 7 hours and 58 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T06:04:39.263792Z 486b3e4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai coderabbitai Bot 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.

Pre-merge checks failed. Please resolve the failing checks before merging.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Base automatically changed from harden-lint-client-tests to main October 12, 2026 12:17
leynos added 2 commits October 15, 2026 14:28
Make app and server accessors const where supported, name reused
bindings distinctly, and simplify optional and fallible paths without
changing their results. Remove private trait aliases and deprecation
suppression by routing internal callers through a documented private
connection handler.

Add a regression test that verifies invalid-frame errors and warning
context through that handler. Preserve the assembly timeout fixture
already stabilized in the prerequisite layer.
Add a trybuild pass case for the const app accessors and packet
constructors. Document the const capability and the retained compatibility
handler and server trait bounds so the public and internal contracts stay
clear.
@leynos
leynos force-pushed the harden-lint-app-server branch from 486b3e4 to 89063bf Compare October 15, 2026 14:20

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Absence of Expected Change Pattern

  • wireframe/src/server/config/binding.rs is usually changed with: wireframe/src/server/config/preamble.rs

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@wafflecat-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai

Please reconcile the pre-merge rows in CodeRabbit's walkthrough against PR #716's current candidate: base 3f144ddf0358891c36eeed80525ce1478d974028, head 89063bfc0d87583a31eb7aa0746867c045c72312.

  • Testing (Overall) and Testing (Compile-Time / UI): Fixed in 89063bf. The trybuild fixture is registered in tests/compile_error.rs and uses Envelope::new, PacketParts::new, and the const WireframeApp APIs. make test passed, including this fixture.
  • User-Facing Documentation: Fixed in the user guide, which names the const APIs and their use in downstream compile-time helpers.
  • Developer Documentation: Fixed in the developer guide, covering the deprecated compatibility entrypoint, private handler, prepared server path, and direct AppFactory/Preamble bounds. The routing preserves existing behaviour and makes no new architectural decision, so a separate design document or ADR change is not applicable.
  • Optional prepared-server error-path test: Stale for this rebased candidate. main already has the prepared handoff and error warning, and this patch only renames the local handoff binding there. The changed unprepared-handler path is covered by unprepared_connection_preserves_stream_errors_and_diagnostics.

The current candidate passed sequential make check-fmt, make lint, make typecheck, make test, make markdownlint, and make nixie.

Please confirm whether these rows are now satisfied on the stated head, or identify any remaining defect.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
base=3f144ddf0358891c36eeed80525ce1478d974028
head=89063bfc0d87583a31eb7aa0746867c045c72312
git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
gh api repos/leynos/wireframe/issues/comments/5808435728 --jq .body
git diff --stat "$base" "$head"
for file in tests/ui/app_const_api.rs tests/compile_error.rs src/app/inbound_handler/mod.rs src/app/inbound_handler/tests.rs src/server/connection_spawner.rs; do
  ast-grep outline "$file" --items all || true
done
git diff "$base" "$head" -- tests/ui/app_const_api.rs tests/compile_error.rs docs/users-guide.md docs/developers-guide.md src/server/connection_spawner.rs src/app/inbound_handler/mod.rs src/app/inbound_handler/tests.rs

Length of output: 39392


🏁 Script executed:

#!/bin/bash
set -euo pipefail
for file in src/server/mod.rs src/server/config/binding.rs src/app/builder/codec.rs src/app/builder/config.rs src/app/envelope.rs; do
  ast-grep outline "$file" --items all || true
done
printf '\n--- Const fixture and registration ---\n'
nl -ba tests/ui/app_const_api.rs
sed -n '1,65p' tests/compile_error.rs
printf '\n--- Guide context ---\n'
sed -n '125,180p' docs/users-guide.md
sed -n '260,325p' docs/developers-guide.md
printf '\n--- Prepared handler at base ---\n'
git show 3f144ddf0358891c36eeed80525ce1478d974028:src/server/connection_spawner.rs | sed -n '57,110p'
printf '\n--- Current handler and regression ---\n'
sed -n '138,205p' src/app/inbound_handler/mod.rs
sed -n '121,165p' src/app/inbound_handler/tests.rs
printf '\n--- Factory and preamble contracts ---\n'
rg -n -A50 -B5 'pub trait (AppFactory|Preamble)\b' src/server
sed -n '1,150p' src/server/config/binding.rs
printf '\n--- Public const API diff ---\n'
git diff 3f144ddf0358891c36eeed80525ce1478d974028 89063bfc0d87583a31eb7aa0746867c045c72312 -- src/app/builder/codec.rs src/app/builder/config.rs src/app/envelope.rs

Length of output: 30234


@wafflecat-df12 Treat all four pre-merge rows as satisfied on 89063bfc0d87583a31eb7aa0746867c045c72312, compared with base 3f144ddf0358891c36eeed80525ce1478d974028.

Row Verified evidence
Testing (Overall) The registered const API fixture closes the compile-time coverage gap. The invalid-frame regression test checks InvalidData propagation and warning context.
Testing (Compile-Time / UI) tests/compile_error.rs registers tests/ui/app_const_api.rs. The fixture constructs Envelope and PacketParts as constants. Its const fn calls codec, fragmentation, and memory_budgets. Removing any of those five public APIs’ const qualifiers would break this fixture.
User-Facing Documentation docs/users-guide.md names all five const APIs and explains their use in downstream compile-time helpers.
Developer Documentation docs/developers-guide.md explains the deprecated compatibility entrypoint, internal unprepared handler, prepared-server path, and direct AppFactory/Preamble bounds. No separate ADR update is required for this behaviour-preserving cleanup.

Discard the optional prepared-server error-path test request for this candidate. The stated base already contains the prepared handoff and its error warning. This candidate only renames the local handoff binding at that call site. My earlier description that this PR routes the server through the unprepared handler was incorrect.

No remaining defect was found in these rows. This conclusion comes from source and diff inspection. I did not rerun the validation commands or verify hosted checks. The walkthrough still displays the older assessment; this reply does not update those generated statuses.

Thanks for clarifying the prepared-server baseline.


✏️ Learnings added
Learnt from: wafflecat-df12
URL: https://github.com/leynos/wireframe/pull/716

Timestamp: 2026-10-15T14:28:25.844Z
Learning: In leynos/wireframe, the server prepared-application handoff and error warning in src/server/connection_spawner.rs already exist at base commit 3f144ddf0358891c36eeed80525ce1478d974028. PR #716 at head 89063bfc0d87583a31eb7aa0746867c045c72312 only renames the local handoff binding at that call site. The new crate-private WireframeApp::handle_unprepared_connection_result in src/app/inbound_handler/mod.rs serves compatibility paths, not the prepared server path. This behaviour-preserving cleanup does not introduce a new architectural decision requiring a separate ADR.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai approve

Published head: 89063bf; base: 3f144dd.

The latest completed review round is a focused current-head reconciliation. CodeRabbit's reply #6194494808 marked all four pre-merge rows satisfied. It also confirmed the optional prepared-server error-path request is stale for this base: the prepared handoff and warning already exist at the base commit.

Earlier substantive review findings from the old candidate were: compile-time API coverage, user-facing documentation, and developer documentation. The current head adds the registered compile-pass fixture and both guide updates. The invalid-frame regression checks error propagation and warning context. CodeRabbit reported no remaining defect in those rows. The old CHANGES_REQUESTED submission is bound to 486b3e4, not this published head.

Pre-merge checks: required build-test passes. The current candidate's sequential local make check-fmt, make lint, make typecheck, and make test all passed; make markdownlint and make nixie also passed. There are no open inline review threads.

CI: run 38750600889 passed. CodeQL run 38750587961 passed across Actions, Python, and Rust. CodeScene result 7971147, Gecko Security, Dependabot configuration, and CodeQL status checks passed; remaining optional checks are skipped.

Rebase/stack state: #716 targets main on base 3f144ddf0358891c36eeed80525ce1478d974028. Prerequisites #712 and #714 are already in that base. Downstream PR #717 depends on this branch and is currently conflicting after the parent rebase; it will be restacked on the squash landing after #716 merges.

Please approve if those findings are resolved. If approval remains blocked, identify the specific unresolved finding or missing required inspection.

1 similar comment
@wafflecat-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai approve

Published head: 89063bf; base: 3f144dd.

The latest completed review round is a focused current-head reconciliation. CodeRabbit's reply #6194494808 marked all four pre-merge rows satisfied. It also confirmed the optional prepared-server error-path request is stale for this base: the prepared handoff and warning already exist at the base commit.

Earlier substantive review findings from the old candidate were: compile-time API coverage, user-facing documentation, and developer documentation. The current head adds the registered compile-pass fixture and both guide updates. The invalid-frame regression checks error propagation and warning context. CodeRabbit reported no remaining defect in those rows. The old CHANGES_REQUESTED submission is bound to 486b3e4, not this published head.

Pre-merge checks: required build-test passes. The current candidate's sequential local make check-fmt, make lint, make typecheck, and make test all passed; make markdownlint and make nixie also passed. There are no open inline review threads.

CI: run 38750600889 passed. CodeQL run 38750587961 passed across Actions, Python, and Rust. CodeScene result 7971147, Gecko Security, Dependabot configuration, and CodeQL status checks passed; remaining optional checks are skipped.

Rebase/stack state: #716 targets main on base 3f144ddf0358891c36eeed80525ce1478d974028. Prerequisites #712 and #714 are already in that base. Downstream PR #717 depends on this branch and is currently conflicting after the parent rebase; it will be restacked on the squash landing after #716 merges.

Please approve if those findings are resolved. If approval remains blocked, identify the specific unresolved finding or missing required inspection.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@pandalump The completed reconciliation identified no remaining defect in the four pre-merge rows at 89063bfc0d87583a31eb7aa0746867c045c72312. The optional prepared-server test request does not apply to this base.

The approval workflow will check current permissions and review readiness before submitting approval.


🧠 Learnings used
Learnt from: wafflecat-df12
URL: https://github.com/leynos/wireframe/pull/716

Timestamp: 2026-10-15T14:28:26.232Z
Learning: In leynos/wireframe, the server prepared-application handoff and error warning in src/server/connection_spawner.rs already exist at base commit 3f144ddf0358891c36eeed80525ce1478d974028. PR #716 at head 89063bfc0d87583a31eb7aa0746867c045c72312 only renames the local handoff binding at that call site. The new crate-private WireframeApp::handle_unprepared_connection_result in src/app/inbound_handler/mod.rs serves compatibility paths, not the prepared server path. This behaviour-preserving cleanup does not introduce a new architectural decision requiring a separate ADR.
✅ Action performed

Changes approved. Review threads were not changed.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@wafflecat-df12 The completed reconciliation found no remaining defect in the four pre-merge rows at 89063bfc0d87583a31eb7aa0746867c045c72312.

The comment chain reports that approval already succeeded. For this repeated request, the approval workflow will check current permissions and review readiness.


🧠 Learnings used
Learnt from: wafflecat-df12
URL: https://github.com/leynos/wireframe/pull/716

Timestamp: 2026-10-15T14:28:26.232Z
Learning: In leynos/wireframe, the server prepared-application handoff and error warning in src/server/connection_spawner.rs already exist at base commit 3f144ddf0358891c36eeed80525ce1478d974028. PR #716 at head 89063bfc0d87583a31eb7aa0746867c045c72312 only renames the local handoff binding at that call site. The new crate-private WireframeApp::handle_unprepared_connection_result in src/app/inbound_handler/mod.rs serves compatibility paths, not the prepared server path. This behaviour-preserving cleanup does not introduce a new architectural decision requiring a separate ADR.
✅ Action performed

CodeRabbit has already approved this PR, so no new approval was submitted. Review threads were not changed.

@leynos
leynos merged commit f955fd2 into main Oct 15, 2026
12 checks passed
@leynos
leynos deleted the harden-lint-app-server branch October 15, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants