Add server runtime skeleton#28
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a new ChangesRuntime server introduction
Policy and licensing updates
Sequence Diagram(s)sequenceDiagram
participant ComponentA
participant ComponentB
ComponentA->>ComponentB: observable interaction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
@codex review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76716e899e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
.agents/skills/commit/SKILL.md (1)
14-16: 📐 Maintainability & Code Quality | 🔵 TrivialAdd language specifier to the fenced code block.
The
Assisted-bytrailer example block lacks a language specifier, triggering markdownlint MD040.~~~~ +```text Assisted-by: AGENT_NAME:MODEL_VERSION ~~~~ +```🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/skills/commit/SKILL.md around lines 14 - 16, The fenced example in SKILL.md is missing a language specifier, which triggers markdownlint MD040. Update the `Assisted-by` trailer example block to use a proper fenced code block language in the markdown around the `Assisted-by` trailer text, keeping the example content the same while making the fence syntax valid.Source: Linters/SAST tools
AGENTS.md (1)
23-25: 📐 Maintainability & Code Quality | 🔵 TrivialAdd language specifier to the fenced code block for consistency.
The
Assisted-bytrailer example block lacks a language specifier, triggering markdownlint MD040. Addtextto match the style of other literal blocks in the document.~~~~ +```text Assisted-by: AGENT_NAME:MODEL_VERSION ~~~~ +```🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AGENTS.md` around lines 23 - 25, The fenced example for the Assisted-by trailer in AGENTS.md is missing a language specifier, causing markdownlint MD040. Update the literal block so it uses a consistent fenced code style with a text specifier, matching the other examples in the document and keeping the Assisted-by trailer snippet intact.Source: Linters/SAST tools
crates/feder-runtime-server/src/app.rs (1)
17-27: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winPrefer an async-aware mutex for shared Axum state.
Line 26 puts
FederCorebehindstd::sync::Mutexeven though this state is mounted into async handlers. That blocking lock will become a Tokio worker bottleneck as soon as a handler starts mutatingcore. Switching totokio::sync::Mutexnow avoids baking the blocking primitive into the app-state surface.Proposed change
-use std::sync::{Arc, Mutex}; +use std::sync::Arc; use crate::config::RuntimeConfig; use axum::{Router, http::StatusCode, routing::get}; use feder_core::{FederConfig, FederCore}; use feder_vocab::Actor; +use tokio::sync::Mutex;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/feder-runtime-server/src/app.rs` around lines 17 - 27, The shared Axum app state currently wraps FederCore in std::sync::Mutex inside AppState, which is a blocking primitive for async handlers. Update AppState to use tokio::sync::Mutex instead, and adjust any lock usage in the async request paths that access core so they await the async mutex; keep the change centered around AppState and any handler code that reads or mutates FederCore.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/commit/SKILL.md:
- Around line 12-16: The trailer example in the commit skill guide is
inconsistent with the Codex guidance. Update the wording around the Assisted-by
trailer in SKILL.md so it either uses a generic AI-assisted reference or matches
the Codex-specific format from AI_POLICY.md; locate the section mentioning the
commit trailer and replace the placeholder agent identifier template with the
correct Codex-oriented example.
In @.github/workflows/main.yaml:
- Around line 35-36: The workflow hardening is incomplete in the checkout and
toolchain setup steps. Update the actions used in the main job by pinning both
actions to full commit SHAs instead of floating refs, and modify the
actions/checkout step to disable credential persistence with persist-credentials
set to false. Use the existing checkout and dtolnay/rust-toolchain entries in
the workflow to locate and tighten these steps.
In `@crates/feder-core/src/lib.rs`:
- Around line 5-7: The license header in the crate-level comment conflicts with
the workspace license declaration. Update the `lib.rs` header to match `license
= "AGPL-3.0-only"` by removing the “any later version” wording, or alternatively
change the Cargo license field to `AGPL-3.0-or-later`; keep the header and
`Cargo.toml` consistent.
In `@crates/feder-runtime-server/README.md`:
- Around line 14-16: The README run example for feder-runtime-server uses
POSIX-only env-var syntax, so update the documentation to either mark the cargo
run example in the relevant README section as Unix-shell-specific or add
equivalent Windows commands for PowerShell and cmd.exe. Keep the guidance near
the existing cargo run snippet and preserve the cross-platform context by
referencing the run example in the README’s usage instructions.
---
Nitpick comments:
In @.agents/skills/commit/SKILL.md:
- Around line 14-16: The fenced example in SKILL.md is missing a language
specifier, which triggers markdownlint MD040. Update the `Assisted-by` trailer
example block to use a proper fenced code block language in the markdown around
the `Assisted-by` trailer text, keeping the example content the same while
making the fence syntax valid.
In `@AGENTS.md`:
- Around line 23-25: The fenced example for the Assisted-by trailer in AGENTS.md
is missing a language specifier, causing markdownlint MD040. Update the literal
block so it uses a consistent fenced code style with a text specifier, matching
the other examples in the document and keeping the Assisted-by trailer snippet
intact.
In `@crates/feder-runtime-server/src/app.rs`:
- Around line 17-27: The shared Axum app state currently wraps FederCore in
std::sync::Mutex inside AppState, which is a blocking primitive for async
handlers. Update AppState to use tokio::sync::Mutex instead, and adjust any lock
usage in the async request paths that access core so they await the async mutex;
keep the change centered around AppState and any handler code that reads or
mutates FederCore.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0d983667-9f00-4649-8e70-6d8c4db04f49
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
.agents/skills/commit/SKILL.md.github/workflows/main.yamlAGENTS.mdAI_POLICY.mdCargo.tomlcrates/feder-core/src/lib.rscrates/feder-runtime-server/Cargo.tomlcrates/feder-runtime-server/README.mdcrates/feder-runtime-server/src/app.rscrates/feder-runtime-server/src/config.rscrates/feder-runtime-server/src/error.rscrates/feder-runtime-server/src/lib.rscrates/feder-runtime-server/src/main.rscrates/feder-vocab/src/lib.rscrates/feder-vocab/tests/phase1_shapes.rs
Assisted-by: Codex:gpt-5.5
76716e8 to
0520f97
Compare
Assisted-by: Codex:gpt-5.5
Summary
feder-runtime-serverworkspace crate for the Phase 2 server runtime./healthzendpoint.FederCorefrom runtime config and attach it to Axum app state.tracing.Scope
This establishes the runnable server runtime skeleton for #22.
The runtime intentionally does not implement WebFinger, actor endpoints, inbox handling, storage, HTTP Signatures, actor fetching, delivery, or JSON-LD normalization yet. Those remain scoped to later Phase 2 issues.
Validation
cargo test --workspacemise run checkRefs #22
Summary by CodeRabbit