Skip to content

chore: shorten agent guidance and enforce rules in CI - #1019

Merged
fengmk2 merged 2 commits into
masterfrom
codex/urllib-guidance
Dec 4, 2026
Merged

fengmk2 merged 2 commits into
masterfrom
codex/urllib-guidance

Conversation

@fengmk2

@fengmk2 fengmk2 commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

AGENTS.md repeated the code and gave conflicting instructions for package commands. Each install could add more instructions to the file.

The shorter guide tells contributors to enforce requirements with code and checks. It requires a blinded comparison before they add guidance for judgment calls.

The prepare script runs vp config --no-agent to keep Git hooks without changing the guide. CI rejects a missing or empty guide and detects generated Vite+ instructions.

The linter rejects direct imports from vite and vitest. Tests check tool dependencies, package commands, default timeouts, and when the client can resend streamed uploads.

Summary by CodeRabbit

  • Tests

    • Added coverage for streamed POST requests involving redirects and server errors, and for applying header and body timeouts.
    • Added checks for package manager and toolchain configuration.
  • Chores

    • Updated package scripts to use Vite+ package management commands.
  • Documentation

    • Replaced detailed project and development documentation with brief agent guidance.

Copilot AI balanced review requested due to automatic review settings December 4, 2026 10:20
@pkg-pr-new

pkg-pr-new Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@1019

commit: ff3599f

@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.80%. Comparing base (2d46561) to head (ff3599f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1019   +/-   ##
=======================================
  Coverage   94.80%   94.80%           
=======================================
  Files          10       10           
  Lines         751      751           
  Branches      235      235           
=======================================
  Hits          712      712           
  Misses         36       36           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR revises AGENTS.md, updates package scripts and lint restrictions for the Vite+ toolchain, and adds tests for streamed POST responses and timeout forwarding.

Changes: Vite+ toolchain conventions

Layer / File(s) Summary
Guidance and toolchain enforcement
AGENTS.md, package.json, vite.config.ts, test/toolchain.test.ts
AGENTS.md now contains guidance on enforceable checks and evaluating agent guidance. The ci script uses vp pm pack, and prepare runs vp config --no-agent. Linting restricts imports from vite and vitest. Tests check the guidance, dependencies, and package scripts.

Request option test coverage

Layer / File(s) Summary
Streamed POST response coverage
test/options.stream.test.ts
Parameterized tests check status, requested URLs, and retry count for streamed POST requests that receive a 307 redirect or a 500 response.
Timeout forwarding coverage
test/options.timeout.test.ts
Parameterized tests check the header and body timeout values passed to the dispatcher for three timeout configurations.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to ff359

This PR shortens the agent guidance, switches a few scripts to Vite+ commands, and adds tests for streamed POST responses and timeout forwarding. I found no concrete merge-blocking risk in the supplied changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: shortening the agent guidance in AGENTS.md and enforcing rules in CI. The raw summary shows AGENTS.md reduced to brief guidance, with enforcement through tests, l…
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.
Full details: Title check

Explanation

The title names the two main changes: shortening the agent guidance in AGENTS.md and enforcing rules in CI. The raw summary shows AGENTS.md reduced to brief guidance, with enforcement through tests, lint rules, and CI checks (toolchain tests, a lint restriction on vite/vitest imports, and a package script change). The title is specific and matches the primary change. It is concise and uses a conventional commit prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 592ca693-5c9b-4dbf-85de-7ea56d0822c5
Commits

Reviewing files that changed from the base of the PR and between e106ef1 and ff3599f.

Files selected for processing: 2

  • AGENTS.md
  • test/toolchain.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Copilot AI 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.

🟢 Approval recommended

No active review issues remain in the toolchain enforcement and request-behavior regression changes.

No open issues 🎉

What changed in this PR

Replaces agent instructions with automated toolchain checks and adds regression tests for urllib’s request behavior.

Changes:

  • Removes AGENTS.md and disables its regeneration while preserving Git hook setup.
  • Enforces Vite+ usage through linting, dependency checks, script checks, and CI packaging.
  • Tests header/body timeout defaults and prevents streamed-upload replay after redirects or server errors.
File Description
vite.config.ts Rejects direct Vite and Vitest imports.
test/​toolchain.test.ts Checks tool dependencies and package-script commands.
test/​options.timeout.test.ts Tests default and explicit-zero timeout forwarding.
test/​options.stream.test.ts Tests streamed-upload redirect and retry suppression.
package.json Uses Vite+ packaging and disables agent-file generation.
AGENTS.md Removes redundant and conflicting instructions.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings December 4, 2026 10:34
@fengmk2 fengmk2 changed the title chore: replace agent instructions with automated checks chore: shorten agent guidance and enforce rules in CI Dec 4, 2026

Copilot AI 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.

🟢 Approval recommended

The review reports no active issues requiring follow-up.

No open issues 🎉

Review effort: Balanced

@fengmk2
fengmk2 merged commit 7a1babf into master Dec 4, 2026
19 checks passed
@fengmk2
fengmk2 deleted the codex/urllib-guidance branch December 4, 2026 11:35
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.

2 participants