Skip to content

Support Astro 6 and 7 with real compatibility tests#936

Open
dahlia wants to merge 19 commits into
fedify-dev:mainfrom
dahlia:packages/astro
Open

Support Astro 6 and 7 with real compatibility tests#936
dahlia wants to merge 19 commits into
fedify-dev:mainfrom
dahlia:packages/astro

Conversation

@dahlia

@dahlia dahlia commented Jul 11, 2026

Copy link
Copy Markdown
Member

Closes #931.

Why this approach

The integration relies on Astro APIs that remained stable across Astro 5, 6, and 7, but its peer dependency and tests did not establish that compatibility. The old tests exercised mocked Astro contexts, which could not catch failures in Vite SSR configuration, adapter peer dependencies, server output, or request routing in a built application.

This PR keeps the supported range explicit at Astro 5–7. Astro 8 will therefore require its own compatibility work instead of being accepted automatically. The repository's development catalog moves to Astro 7 so normal builds and type checks use the newest supported major, while a separate compatibility task protects the older majors.

How compatibility is verified

The compatibility runner in packages/astro/compat/run.ts packs the local Fedify packages, installs them into a minimal Astro application with strict peer dependency checks, and builds a server for each supported Astro major. It then starts the built application and makes real HTTP requests rather than calling the middleware with a mocked context.

The requests cover the boundary between Astro and Fedify: HTML falls through to an Astro page on a shared route, ActivityPub and WebFinger requests are handled by Fedify, unrelated routes retain Astro's 404 response, and an unacceptable representation returns 406 with Vary: Accept. The fixture also uses sequence() so middleware composition is exercised by the same test.

Astro 5, 6, and 7 are paired with Node.js adapter majors 9, 10, and 11. Astro 7 is also built and run with Deno and Bun. Bun uses the Node.js standalone adapter because the previous Bun-specific adapter only declares support for Astro 5; the generated server has been tested under Bun instead of relying on that incompatible peer range.

How generated projects avoid version drift

The Astro initializer now generates Astro 7 projects with matching Node.js and Deno adapters. It pins both the create-astro major and the Astro repository template ref, rather than combining a future astro@latest scaffold with pinned Astro 7 dependencies. The initializer tests assert those versions and build generated Node.js/Bun projects after installation, which catches template and adapter mismatches at the point users would encounter them.

The Astro example follows the same runtime configurations as generated projects. Its Node.js/Deno/Bun builds and the compatibility suite run in .github/workflows/examples.yaml, keeping example and framework compatibility checks separate from the already broad main workflow.

The integration guide, packages/astro/README.md, examples/astro/README.md, and docs/tutorial/astro-blog.md explain why Fedify needs on-demand rendering, how HTML and ActivityPub can share a route, how to compose middleware, and which adapters are tested for each runtime.

Verification

  • mise run check
  • mise run test-each astro init
  • mise run test:astro-compat
  • Node.js/Deno/Bun builds for examples/astro
  • A generated npm Astro project build, server startup, and lookup test
  • actionlint for .github/workflows/examples.yaml

Broaden @fedify/astro's peer range and add a compatibility harness that
builds and exercises Astro 5, 6, and 7 across the supported runtimes.

Move the Astro example and initializer to Astro 7, pin scaffolding to the
matching template, and use the Node standalone adapter for Bun.  Run the
compatibility suite and example builds in their own workflow, and update
the documentation.

fedify-dev#931
fedify-dev#936

Assisted-by: Codex:gpt-5.6-sol
@dahlia dahlia added this to the Fedify 2.4 milestone Jul 11, 2026
@dahlia dahlia self-assigned this Jul 11, 2026
@dahlia dahlia requested review from 2chanhaeng and sij411 as code owners July 11, 2026 23:37
@dahlia dahlia added component/cli CLI tools related component/integration Web framework integration examples Example code related dependencies Dependency updates and issues integration/astro Astro integration (@fedify/astro) labels Jul 11, 2026
@netlify

netlify Bot commented Jul 11, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema canceled.

Name Link
🔨 Latest commit 59c7432
🔍 Latest deploy log https://app.netlify.com/projects/fedify-json-schema/deploys/6a5331e895f91c000867bb6e

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review 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
📝 Walkthrough

Walkthrough

Updates @fedify/astro for Astro 5–7, adds real compatibility tests, upgrades examples and generated projects to Astro 7, replaces the Bun adapter with standalone Node output, adds CI coverage, and revises integration documentation.

Changes

Astro package and initializer baseline

Layer / File(s) Summary
Package versions, generated projects, and validation
deno.json, pnpm-workspace.yaml, packages/astro/..., packages/init/...
Astro peer support expands to versions 5–7; initializer dependencies, adapter templates, version-pinned commands, build commands, Deno linking, and generated-project validation are updated.

Real Astro compatibility harness

Layer / File(s) Summary
Compatibility fixtures and HTTP checks
packages/astro/compat/...
Adds temporary Astro applications covering supported Astro and adapter combinations, builds and starts each fixture, and validates HTML, ActivityPub, WebFinger, fallback, status, and middleware responses.

Example builds and CI integration

Layer / File(s) Summary
Runtime configuration and automated builds
examples/astro/..., mise.toml, .github/workflows/examples.yaml
The example uses standalone Node output, composed middleware, updated Deno dependencies, and runtime-specific build scripts; compatibility and Node, Deno, and Bun builds are added to local and CI tasks.

Documentation and release notes

Layer / File(s) Summary
Astro integration guidance
packages/astro/README.md, docs/manual/integration.md, docs/tutorial/astro-blog.md, examples/astro/README.md, CHANGES.md
Documentation describes Astro 5–7 support, server adapters, prerendering, middleware sequencing, Bun setup, and updated Astro 7 examples and tutorials.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant CompatibilityRunner
  participant AstroApp
  participant HTTPAssertions
  CI->>CompatibilityRunner: run Astro compatibility task
  CompatibilityRunner->>AstroApp: install, build, and start fixture
  CompatibilityRunner->>AstroApp: wait for readiness
  HTTPAssertions->>AstroApp: request HTML, ActivityPub, WebFinger, 404, and 406 routes
  AstroApp-->>HTTPAssertions: return rendered responses and headers
Loading

Possibly related PRs

Suggested labels: component/build, type/enhancement

Suggested reviewers: sij411, 2chanhaeng

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding real Astro compatibility tests and broadening support, though it omits retained Astro 5 support.
Description check ✅ Passed The description is detailed and directly describes the Astro compatibility, init, example, and documentation changes.
Linked Issues check ✅ Passed The changes address the Astro 5–7 support, real compatibility tests, init scaffolding, docs, and changelog requirements from #931.
Out of Scope Changes check ✅ Passed The diff appears focused on Astro support, testing, init templates, workflows, and docs with no clear unrelated additions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds and tests support for Astro 6 and 7 while maintaining compatibility with Astro 5. It updates the Astro example and fedify init templates to use Astro 7, and switches the Bun runtime adapter from the Astro-5-only @nurodev/astro-bun to @astrojs/node in standalone mode. Additionally, a new compatibility test suite has been introduced to verify @fedify/astro across different Astro and runtime versions. Feedback on these changes includes correcting a file path formatting style in the documentation and avoiding a hardcoded port for Deno in the compatibility runner to prevent potential port collisions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/astro/README.md Outdated
Comment thread packages/astro/compat/run.ts Outdated
@dahlia

dahlia commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

@codex review

Use the runtime's official name in changelog entries, migration guidance,
and tutorial prose instead of shortening it to Node.

fedify-dev#936

Assisted-by: Codex:gpt-5.6-sol
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 32076129c9

ℹ️ 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".

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.29032% with 24 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/init/src/action/utils.ts 5.55% 17 Missing ⚠️
packages/init/src/lib.ts 0.00% 6 Missing ⚠️
packages/init/src/action/configs.ts 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
packages/init/src/action/deps.ts 84.07% <100.00%> (+4.07%) ⬆️
packages/init/src/webframeworks/astro.ts 100.00% <100.00%> (+15.84%) ⬆️
packages/init/src/action/configs.ts 86.36% <0.00%> (ø)
packages/init/src/lib.ts 66.66% <0.00%> (-1.45%) ⬇️
packages/init/src/action/utils.ts 49.33% <5.55%> (-15.08%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Actionable comments posted: 3

🤖 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 @.github/workflows/examples.yaml:
- Line 14: Update both actions/checkout steps in the workflow to pin the action
to a specific commit SHA instead of the v6 tag, and set persist-credentials to
false. Apply the same hardening to the checkout step referenced at the
additional location while preserving the existing job behavior.
- Around line 11-16: Add an explicit top-level permissions block to the
workflow, granting only contents: read for the checkout and test steps. Keep the
existing test-astro-compat job steps unchanged.

In `@packages/init/src/test/create.ts`:
- Around line 173-192: Update validateFrameworkBuild so Astro projects using
Deno are not excluded by the early-return condition. Allow the existing
build-command execution and result validation to run for the supported
Astro/Deno combination while preserving the skip behavior for non-Astro
frameworks.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 491ba7f7-811a-466c-86f2-d48f0cf18db9

📥 Commits

Reviewing files that changed from the base of the PR and between 3b4bfbb and 3207612.

⛔ Files ignored due to path filters (2)
  • deno.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • .github/workflows/examples.yaml
  • CHANGES.md
  • deno.json
  • docs/manual/integration.md
  • docs/tutorial/astro-blog.md
  • examples/astro/README.md
  • examples/astro/astro.config.bun.ts
  • examples/astro/deno.json
  • examples/astro/package.json
  • examples/astro/src/middleware.ts
  • mise.toml
  • packages/astro/README.md
  • packages/astro/compat/astro.config.mjs.tpl
  • packages/astro/compat/run.ts
  • packages/astro/compat/src/federation.ts
  • packages/astro/compat/src/middleware.ts
  • packages/astro/compat/src/pages/users/[identifier].astro
  • packages/astro/package.json
  • packages/init/src/json/deps.json
  • packages/init/src/lib.ts
  • packages/init/src/package.test.ts
  • packages/init/src/templates/astro/astro.config.bun.ts.tpl
  • packages/init/src/test/create.ts
  • packages/init/src/webframeworks/astro.ts
  • pnpm-workspace.yaml

Comment thread .github/workflows/examples.yaml
Comment thread .github/workflows/examples.yaml
Comment thread packages/init/src/test/create.ts
dahlia added 3 commits July 12, 2026 09:30
Follow the documentation convention for file paths in the example's
implementation overview.

fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Give the workflow read-only repository access and prevent checkout from
persisting credentials before dependency install and build steps run.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Give each Deno compatibility server a reserved port and embed that port in
the adapter configuration at build time.  Generate npm-backed dependencies
that Vite can resolve, then build generated Deno projects with local package
links exposed through node_modules.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds support for Astro 6 and 7 while maintaining compatibility with Astro 5, replacing the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun, and introducing a compatibility test suite. Feedback on these changes focuses on improving robustness and maintainability: specifically, ensuring fetched response bodies are cancelled in the test runner to prevent resource leaks, resolving cross-platform path issues on Windows by normalizing backslashes in file: dependencies, using lstat instead of stat to safely handle broken symlinks, and dynamically referencing dependency versions from deps.json in test assertions to avoid fragile hardcoded values.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/astro/compat/run.ts Outdated
Comment thread packages/astro/compat/run.ts
Comment thread packages/init/src/test/create.ts Outdated
Comment thread packages/init/src/test/create.ts
Comment thread packages/init/src/package.test.ts
Comment thread packages/init/src/package.test.ts Outdated
Comment thread packages/init/src/package.test.ts Outdated
dahlia added 3 commits July 12, 2026 11:30
Use package-relative tarball references so pnpm receives portable file
specifiers on every platform.  Cancel response bodies even when status
assertions fail so repeated compatibility cases do not leak resources.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Inspect workspace link entries without following them.  This keeps a
broken symlink from being mistaken for a missing path and avoids trying
to recreate an entry that already exists.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Read initializer dependency expectations from deps.json so routine
version updates do not leave the Astro assertions stale or require a
second set of hardcoded versions to be maintained.

fedify-dev#936 (comment)
fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds and tests support for Astro 6 and 7 within the @fedify/astro package while maintaining compatibility with Astro 5. Key changes include upgrading default dependencies to Astro 7 and @astrojs/node 11, replacing the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun runtimes, and introducing a comprehensive compatibility test suite (packages/astro/compat/run.ts). Additionally, documentation, examples, and the @fedify/init templates have been updated to align with these upgrades. There are no review comments to address in this pull request.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: c99a7548f4

ℹ️ 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".

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds and tests support for Astro 6 and 7 in @fedify/astro while maintaining Astro 5 compatibility. It updates templates and examples to use Astro 7, replacing the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun, and introduces a compatibility test suite. Feedback on the new test runner (run.ts) highlights a potential deadlock issue when spawning the test server with piped stdout/stderr without actively consuming them in the background, which could cause the readiness check to time out, as well as a potential block when calling process.output() on already-consumed streams.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/astro/compat/run.ts
Comment thread packages/astro/compat/run.ts Outdated
Document that the JSR package remains available while Deno-based Astro
projects use npm packages because Vite resolves their bare imports from
node_modules.  Keep the same rationale beside the initializer dependency
selection so it is not mistaken for an accidental registry choice.

fedify-dev#936

Assisted-by: Codex:gpt-5.6-sol

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4c4742cf5

ℹ️ 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".

Comment thread packages/init/src/webframeworks/astro.ts
@dahlia dahlia requested a review from sij411 July 12, 2026 05:15
dahlia added 2 commits July 12, 2026 14:18
Consume stdout and stderr as soon as the compatibility server starts so
its pipe buffers cannot block readiness checks.  Reuse those background
reads when reporting a failed server run.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Normalize Fedify KV and message queue adapters to npm in Deno-based Astro
projects so Vite can resolve non-default backends from node_modules.  Keep
the Deno lint plugin on JSR because Vite does not load it.

fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for Astro 6 and 7 in @fedify/astro while maintaining Astro 5 compatibility, updating examples, templates, and documentation accordingly. Notably, the Bun adapter configuration has been migrated from @nurodev/astro-bun to @astrojs/node in standalone mode, and a new compatibility test suite has been added. Feedback on the compatibility test runner (packages/astro/compat/run.ts) highlights a cross-platform issue where calling process.kill("SIGTERM") will fail on Windows, potentially leaking background server processes; using SIGKILL or checking the OS is recommended to resolve this.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/astro/compat/run.ts Outdated
Comment thread packages/astro/compat/run.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2627705004

ℹ️ 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".

Comment thread packages/init/src/json/deps.json

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/astro/README.md (1)

54-67: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the middleware composition example self-contained.

otherMiddleware is never declared or imported, so copying this example into a TypeScript middleware file produces an unresolved identifier. Add a minimal MiddlewareHandler definition or explicitly mark it as a project-provided placeholder.

Proposed fix
 import { fedifyMiddleware } from "`@fedify/astro`";
+import type { MiddlewareHandler } from "astro";
 import { sequence } from "astro:middleware";
 import federation from "./federation.ts";
 
+const otherMiddleware: MiddlewareHandler = async (_context, next) => next();
+
 export const onRequest = sequence(
   otherMiddleware,
🤖 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 `@packages/astro/README.md` around lines 54 - 67, Add a self-contained
declaration for otherMiddleware in the middleware composition example, importing
MiddlewareHandler as a type from astro and defining a minimal pass-through
handler before onRequest. Keep the existing fedifyMiddleware and sequence
composition unchanged.
🤖 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 `@packages/astro/compat/run.ts`:
- Around line 199-200: Add SIGKILL escalation to the shutdown handling around
the process managed by main: after sending SIGTERM, wait only a short grace
period while allowing normal process.status completion, then send SIGKILL if the
child remains alive. Ensure the finally path cannot hang when SIGTERM is
ignored, while preserving graceful shutdown for processes that exit promptly.

---

Outside diff comments:
In `@packages/astro/README.md`:
- Around line 54-67: Add a self-contained declaration for otherMiddleware in the
middleware composition example, importing MiddlewareHandler as a type from astro
and defining a minimal pass-through handler before onRequest. Keep the existing
fedifyMiddleware and sequence composition unchanged.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c1986675-495e-454a-9075-ec9ae3346bd4

📥 Commits

Reviewing files that changed from the base of the PR and between d4c4742 and 2627705.

📒 Files selected for processing (6)
  • docs/manual/integration.md
  • packages/astro/README.md
  • packages/astro/compat/run.ts
  • packages/init/src/action/configs.test.ts
  • packages/init/src/action/deps.ts
  • packages/init/src/webframeworks/astro.ts

Comment thread packages/astro/compat/run.ts
dahlia added 3 commits July 12, 2026 14:37
Declare the additional middleware in the composition example so readers
can copy a self-contained, type-checked sequence without inventing the
missing handler.

fedify-dev#936 (review)

Assisted-by: Codex:gpt-5.6-sol
Use an immediate hard kill on Windows and allow a short graceful shutdown
period elsewhere before escalating to SIGKILL.  This prevents compatibility
tests from leaking servers or waiting forever for an ignored signal.

fedify-dev#936 (comment)
fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Check for Node.js 22.12 or later before npm, pnpm, or Yarn scaffolds an
Astro 7 project.  Deno and Bun paths keep using their own runtimes and do
not need the Node.js guard.

fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for Astro 6 and 7 in @fedify/astro while maintaining Astro 5 compatibility. It updates the Astro example and fedify init templates to use Astro 7, replaces the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun, and adds a compatibility test suite. Documentation and initialization logic have also been updated to reflect these changes and ensure proper Vite resolution for Deno. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d49afcbcb

ℹ️ 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".

Comment thread packages/astro/compat/run.ts Outdated
Run the Deno and Bun compatibility builds through their own Astro command
paths instead of using a Node.js/pnpm build for every case.  This lets the
matrix catch runtime-specific package resolution and build failures.

fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds support for Astro 6 and 7 to @fedify/astro while maintaining compatibility with Astro 5. It updates the fedify init templates, examples, and documentation to use Astro 7, and replaces the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun runtimes. Additionally, a compatibility test suite has been introduced to verify @fedify/astro across different Astro versions and runtimes. Feedback on the changes suggests wrapping the temporary directory cleanup in a try/catch block within the test runner's finally block to prevent cleanup errors from masking primary test failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/astro/compat/run.ts

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4fd7345ba

ℹ️ 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".

Comment thread packages/init/src/webframeworks/astro.ts
Comment thread packages/astro/compat/run.ts Outdated
dahlia added 2 commits July 12, 2026 15:18
Include the supported Astro range in generated Deno tasks and the Deno
compatibility build.  This prevents a future npm default from silently
changing the CLI major used with an Astro 7 project or matrix case.

fedify-dev#936 (comment)
fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
Log temporary-directory cleanup errors when a compatibility case has
already failed, so cleanup cannot hide the original diagnostic.  Cleanup
failures still fail otherwise successful cases instead of passing silently.

fedify-dev#936 (comment)

Assisted-by: Codex:gpt-5.6-sol
@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for Astro 6 and 7 in @fedify/astro while maintaining backward compatibility with Astro 5. Key changes include updating the Astro example and fedify init templates to use Astro 7 and @astrojs/node 11, replacing the Astro-5-only @nurodev/astro-bun adapter with @astrojs/node in standalone mode for Bun runtimes, and adding a comprehensive compatibility test suite (packages/astro/compat/run.ts) to verify integrations across different Astro and runtime versions. Additionally, documentation, examples, and initializer scripts have been updated to reflect these upgrades and guide users on middleware composition using sequence(). No review comments were provided, so there is no feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 59c7432c73

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

Pre-release has been published for this pull request:

Packages

Package Version JSR npm
@fedify/fedify 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/cli 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/amqp 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/astro 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/backfill 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/cfworkers 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/create 2.4.0-pr.936.41+59c7432c npm
@fedify/debugger 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/denokv 2.4.0-pr.936.41+59c7432c JSR
@fedify/elysia 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/express 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/fastify 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/fixture 2.4.0-pr.936.41+59c7432c JSR
@fedify/fresh 2.4.0-pr.936.41+59c7432c JSR
@fedify/h3 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/hono 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/init 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/koa 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/lint 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/mysql 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/nestjs 2.4.0-pr.936.41+59c7432c npm
@fedify/next 2.4.0-pr.936.41+59c7432c npm
@fedify/nuxt 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/postgres 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/redis 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/relay 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/solidstart 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/sqlite 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/sveltekit 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/testing 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/uri-template 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/vocab 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/vocab-runtime 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/vocab-tools 2.4.0-pr.936.41+59c7432c JSR npm
@fedify/webfinger 2.4.0-pr.936.41+59c7432c JSR npm

Documentation

The docs for this pull request have been published:

https://51a2506f.fedify.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/cli CLI tools related component/integration Web framework integration dependencies Dependency updates and issues examples Example code related integration/astro Astro integration (@fedify/astro)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@fedify/astro support for Astro 6 and 7

2 participants