Skip to content

Add repo wiki advisory context packets#474

Merged
100yenadmin merged 20 commits into
mainfrom
issue-415-openwiki-advisory-context
Jul 9, 2026
Merged

Add repo wiki advisory context packets#474
100yenadmin merged 20 commits into
mainfrom
issue-415-openwiki-advisory-context

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

Summary

Refs #415.

Adds a disabled-by-default repoWikiContext advisory packet path for NeonDiff review prompts:

  • config shape: repoWikiContext.enabled, packetPath, maxPacketBytes, includeStaleContext
  • packet loader for Markdown, generic JSON with markdown, and deterministic repo-wiki packet JSON
  • prompt section with packet SHA, size budget, freshness, degraded-mode status, and explicit authority boundary
  • worker evidence for enabled packet success/degraded failure without blocking review execution
  • bounds, stale, missing, budget, and secret-like content gates
  • docs and tests for default-off behavior and lab-only OpenWiki-derived packets

This does not enable live daemon behavior, cron, OpenWiki generation, GitHub posting changes, or auto-edits to docs. OpenWiki remains advisory orientation only; current PR diff, checkout files, and GitHub metadata remain authoritative.

Validation

Local focused validation from /Volumes/LEXAR/repos/worktrees/neondiff-openwiki-context-415:

npx vitest run tests/repo-wiki-context.test.ts tests/repo-wiki-packet.test.ts tests/zcode-output.test.ts tests/review-mode-router.test.ts tests/gitnexus-context.test.ts tests/github-related-context.test.ts tests/repo-memory.test.ts
npm run build
git diff --check

Result:

  • 7 test files passed
  • 109 tests passed
  • TypeScript build passed
  • diff check passed

Offline eval-suite baseline:

npm run eval:suite -- --input-dir tests/fixtures/eval-suite-scenarios --output-root /Volumes/LEXAR/Codex/neondiff-openwiki-context/2026-07-09/eval-suite-baseline

Result:

  • 5 eval-suite scenarios passed

OpenWiki Smoke

Evidence root: /Volumes/LEXAR/Codex/neondiff-openwiki-context/2026-07-09/

  • OpenWiki fork registered locally for GitNexus/code-review visibility as alias openwiki.
  • Upstream docs-only confinement PR opened separately: fix: constrain init update writes to openwiki langchain-ai/openwiki#230.
  • OpenWiki generation against a scratch NeonDiff checkout used Z.AI/GLM through the Anthropic-compatible route.
  • Generated paths were confined to openwiki/**; a later local converter wrote .neondiff/repo-wiki-packet.json as a lab artifact.
  • The OpenWiki run timed out after 15 minutes with partial docs, so the derived packet is marked stale/degraded.
  • NeonDiff's conservative secret-like scanner flagged openwiki/config/configuration.md because it lists NEONDIFF_GITHUB_TOKEN.
  • Source-backed claim sample: 14/15 passed, 0 critical failures; the miss was a noncritical test-file count claim.

Conclusion: OpenWiki-derived context is promising but not clean enough for default prompt use yet. This PR ships the disabled safe seam; live/lab enablement should use a curated deterministic packet first, then rerun OpenWiki after the timeout and secret-wording issues are fixed.

Proof Boundary

This PR proves the feature-gated packet attach/degrade/redact path, not production enablement. #415 should remain open until the review-quality A/B delta is reported for deterministic and OpenWiki-derived packets.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 05095a82-ecb1-4509-b1ab-26e3791d5a79

📥 Commits

Reviewing files that changed from the base of the PR and between e9a9310 and 1b39d00.

📒 Files selected for processing (2)
  • src/repo-wiki-context.ts
  • tests/repo-wiki-context.test.ts
📝 Walkthrough

Walkthrough

Adds optional repo-wiki advisory context from a prepared PR worktree, wires it through review-mode gating and worker execution, and renders it as untrusted prompt content with path, freshness, budget, and redaction controls.

Changes

RepoWikiContext feature

Layer / File(s) Summary
Config schema and validation
config.example.json, src/config.ts
Adds optional repoWikiContext config, default-disabled values, validation, and includes it in review-mode base context addon gating.
Packet builder and parsing
src/repo-wiki-context.ts
Builds standardized repo-wiki packets from worktree files, validates paths and shapes, parses supported packet formats, and returns omission reasons when context is rejected.
Review mode analysis plan gating
src/review-mode-types.ts, src/review-mode-router.ts, tests/review-mode-router.test.ts
Adds repoWikiContext to the analysis plan and updates routing tests for demote-only behavior.
Worker wiring and evidence
src/worker.ts
Selects the analysis plan, gates repo-wiki packet creation, writes evidence artifacts, and passes the packet into prompt building.
Prompt formatting
src/zcode.ts
Extends review prompt input with repoWikiContextPacket and renders advisory context as untrusted quoted content.
Tests and documentation
tests/repo-wiki-context.test.ts, tests/zcode-output.test.ts, docs/neondiff-config.md, docs/repo-wiki-packet.md
Adds coverage for packet handling, safety checks, worker evidence, prompt quoting, and documents the config surface and runtime boundary.

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

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% 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 accurately summarizes the new repo wiki advisory context packet feature. Confidence 96%.
Description check ✅ Passed The description is clearly related to the repo-wiki advisory packet changes and validation. Confidence 98%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-415-openwiki-advisory-context

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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@100yenadmin

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: stale head

PR: #474 - Add repo wiki advisory context packets
Head: 9ec0e8a1ce7b65760ecf6986d921c307efc6390e
Updated: 2026-07-09T05:17:37.813Z

evaOS review stopped because this queued head is no longer the live PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: stale head

PR: #474 - Add repo wiki advisory context packets
Head: 5886dc843544af362b582dc9bbb8f491443277d4
Updated: 2026-07-09T05:24:11.040Z

evaOS review stopped because this queued head is no longer the live PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Details: live=65796726668474d334c53b38e592e1115e2a426c

@100yenadmin
100yenadmin force-pushed the issue-415-openwiki-advisory-context branch from 5886dc8 to 6579672 Compare July 9, 2026 05:24
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: 65796726668474d334c53b38e592e1115e2a426c
Updated: 2026-07-09T05:27:32.048Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: 65796726668474d334c53b38e592e1115e2a426c into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +17/-0 Documentation Low
docs/repo-wiki-packet.md modified +14/-8 Documentation Low
src/config.ts modified +23/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +257/-0 Runtime code Moderate: validated P3 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +33/-0 Runtime code Moderate: runtime path
src/zcode.ts modified +15/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +229/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 0, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: ada4e1d5b3a806b5b19694e83be005be5f681402
Updated: 2026-07-09T05:34:09.691Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: ada4e1d5b3a806b5b19694e83be005be5f681402 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +17/-0 Documentation Low
docs/repo-wiki-packet.md modified +14/-8 Documentation Low
src/config.ts modified +23/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +257/-0 Runtime code Moderate: validated P2 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +33/-0 Runtime code Moderate: runtime path
src/zcode.ts modified +15/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +250/-0 Test coverage Moderate: validated P3 finding
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Security boundary: 3

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread tests/repo-wiki-context.test.ts
Comment thread src/repo-wiki-context.ts Outdated
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: eb39352b915ecc5bc53bf62de5a98f109e490113
Updated: 2026-07-09T05:43:09.282Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: eb39352b915ecc5bc53bf62de5a98f109e490113 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +17/-0 Documentation Low
docs/repo-wiki-packet.md modified +14/-8 Documentation Low
src/config.ts modified +23/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +262/-0 Runtime code Elevated: large change
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: validated P3 finding
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +33/-0 Runtime code Moderate: runtime path
src/zcode.ts modified +15/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +290/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 0, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/review-mode-router.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: f3ed50ed5b5aafbd76b85d64081a6ad14fa0efeb
Updated: 2026-07-09T05:56:02.196Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: f3ed50ed5b5aafbd76b85d64081a6ad14fa0efeb into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +17/-0 Documentation Low
docs/repo-wiki-packet.md modified +14/-8 Documentation Low
src/config.ts modified +23/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +262/-0 Runtime code Moderate: validated P2 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +63/-13 Runtime code Moderate: runtime path
src/zcode.ts modified +15/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +312/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 1
  • Runtime correctness: 1
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread src/repo-wiki-context.ts Outdated
Comment thread src/repo-wiki-context.ts Outdated
@100yenadmin

Copy link
Copy Markdown
Member Author

@evaos-code-review-bot review

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: 83a8254be358a2b430a5338b0f44814ee040b491
Updated: 2026-07-09T06:16:31.737Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot

Copy link
Copy Markdown

evaOS Code Review Bot queued a current-head review for electricsheephq/evaos-code-review-bot-neondiff#474 at 83a8254be358a2b430a5338b0f44814ee040b491.

Command: review from 100yenadmin comment 4922109474.

Safety boundary: command handling cannot approve, merge, repair, push branches, or expand repo permissions.

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: 83a8254be358a2b430a5338b0f44814ee040b491 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +18/-0 Documentation Low
docs/repo-wiki-packet.md modified +21/-8 Documentation Low
src/config.ts modified +23/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +264/-0 Runtime code Moderate: validated P3 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +63/-13 Runtime code Moderate: runtime path
src/zcode.ts modified +16/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +380/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 0, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread src/repo-wiki-context.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: 99ca85c6453e10b66de47eb1bfaec4deea9d48f1
Updated: 2026-07-09T06:31:55.978Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: 99ca85c6453e10b66de47eb1bfaec4deea9d48f1 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +19/-0 Documentation Low
docs/repo-wiki-packet.md modified +23/-8 Documentation Low
src/config.ts modified +25/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +305/-0 Runtime code Moderate: validated P2 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +63/-13 Runtime code Moderate: validated P3 finding
src/zcode.ts modified +16/-0 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +416/-0 Test coverage Moderate: validated P3 finding
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 1, P3: 3).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 1
  • Runtime correctness: 2
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread tests/repo-wiki-context.test.ts
Comment thread src/repo-wiki-context.ts Outdated
Comment thread src/worker.ts

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

Caution

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

⚠️ Outside diff range comments (1)
src/repo-wiki-context.ts (1)

103-134: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Restore the pre-read size gate
readFileSync(sourcePath, "utf8") still unconditionally pulls the entire PR-controlled packet into memory before budget_exceeded can fire. A maliciously large .neondiff/repo-wiki-packet.json can force a full read/UTF-8 decode first, which is the memory-exhaustion path this guard is supposed to block. Check file metadata up front (statSync) and reject oversized packets before readFileSync/decode/parse. Confidence: 85%.

🤖 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 `@src/repo-wiki-context.ts` around lines 103 - 134, The repo wiki packet
handling in the context loader still reads the full file before the size check,
so restore the pre-read guard in the packet-loading flow around the
readFileSync/sourcePath logic. Use file metadata first (for example via
statSync) to compare the packet size against maxPacketBytes plus
PACKET_FILE_OVERHEAD_BYTES, and return the budget_exceeded omitted result before
any UTF-8 decode or parse happens. Keep the existing omitted reasons and
evidenceSourcePath behavior in the same packet-loading path.
🤖 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.

Outside diff comments:
In `@src/repo-wiki-context.ts`:
- Around line 103-134: The repo wiki packet handling in the context loader still
reads the full file before the size check, so restore the pre-read guard in the
packet-loading flow around the readFileSync/sourcePath logic. Use file metadata
first (for example via statSync) to compare the packet size against
maxPacketBytes plus PACKET_FILE_OVERHEAD_BYTES, and return the budget_exceeded
omitted result before any UTF-8 decode or parse happens. Keep the existing
omitted reasons and evidenceSourcePath behavior in the same packet-loading path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fd45a248-755a-44e8-86a7-dec97ee0107d

📥 Commits

Reviewing files that changed from the base of the PR and between 1171740 and 16f20ae.

📒 Files selected for processing (8)
  • config.example.json
  • docs/neondiff-config.md
  • src/config.ts
  • src/repo-wiki-context.ts
  • src/worker.ts
  • src/zcode.ts
  • tests/repo-wiki-context.test.ts
  • tests/zcode-output.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Build, test, and package
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
🪛 ast-grep (0.44.1)
src/zcode.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

🔇 Additional comments (13)
src/worker.ts (3)

56-61: Diff content doesn't match PR objectives/line_range_change_details.

Every PR-level artifact (objectives, commit summary, line_range_change_details) describes this cohort as repoWikiContext review-mode gating and worker wiring. The actual ~-marked diff in this file is entirely about a new buildReviewLensContext/review-lens feature — no repoWikiContext lines are marked as changed (they're shown only as unchanged context, already fixed per the prior review thread). Reviewing on the assumption the described repoWikiContext gating is what's under test here would be reviewing against the wrong code.

Also applies to: 1493-1498, 1525-1525, 2390-2419


1493-1498: Wiring itself is fine.

Call site and prompt-spread follow the established optional-packet pattern (packet ? {...} : {}). No issues beyond the throw behavior flagged separately above.

Also applies to: 1525-1525


2404-2407: 🩺 Stability & Availability

Potential hard-fail in buildReviewLensContext. If this throw is reachable, one redaction failure will reject reviewPull and block the entire PR review instead of degrading to {} like the other optional context builders. Please confirm the intended failure mode. Confidence: 52%.

src/zcode.ts (3)

195-259: LGTM! All other advisory-packet builders (skill-pack, GitHub-related, GitNexus, repo-wiki, repo-memory) consistently route through buildAdvisoryContextPromptSection/quoteAdvisoryMarkdown, correctly closing the injection surface previously flagged and confirmed fixed.


9-17: LGTM! Import addition, extended buildReviewPrompt input typing (including repoWikiContextPacket/reviewLensPacket), and conditional prompt-section inclusion are consistent with the rest of the assembly pipeline.

Also applies to: 124-136, 148-176


18-21: 🔒 Security & Privacy

ReviewLens markdown should use the shared advisory renderer.

buildReviewLensPromptSection still appends packet.markdown.trim() directly, unlike the other advisory packet paths that go through buildAdvisoryContextPromptSection/quoteAdvisoryMarkdown. If ReviewLensPacket content is untrusted, this leaves the same prompt-injection surface open and should be routed through the shared quoting path.

tests/repo-wiki-context.test.ts (1)

264-282: LGTM!

Also applies to: 359-424

tests/zcode-output.test.ts (1)

2-3: LGTM!

Also applies to: 40-65, 67-101

config.example.json (1)

60-66: LGTM!

docs/neondiff-config.md (1)

311-329: LGTM!

src/config.ts (1)

82-82: LGTM!

Also applies to: 657-659, 929-929, 994-1005

src/repo-wiki-context.ts (2)

136-196: LGTM on the previously-flagged hardening — all confirmed still in place except the read-before-size-check regression noted separately.

Freshness-before-budget ordering (166-184), raw+rendered secret scanning (136, 155), hash recomputed from markdown rather than trusted from packet fields (339), and headSha-gated "fresh" claims (334-335) all match the fixes recorded in this file's review history and show no regression here.

Also applies to: 236-269, 316-351


364-370: 🎯 Functional Correctness | ⚡ Quick win

Type-guard accepts a source.status value the target type doesn't declare.

readFreshness (line 432) treats "unknown" as a valid return value, so validateRepoWikiPacketShape (line 370) accepts source.status: "unknown" from PR-authored JSON, and isRepoWikiPacketShape (line 391-393) then asserts the parsed object is RepoWikiPacket. But RepoWikiSourceStatus (src/repo-wiki-packet.ts) is declared as "fresh" | "stale" | "missing" only — "unknown" isn't a member.

Impact today is contained: packetFromRepoWikiPacket re-derives freshness via readFreshness(safePacket.source.status) ?? "unknown", so runtime behavior is correct regardless. But the type guard is unsound — any future code that exhaustively switches on RepoWikiPacket["source"]["status"] (3 cases) assuming TypeScript's guarantee will silently mishandle an actual "unknown" value, since the compiler thinks that branch is unreachable. Confidence: 70% — this is a static-typing soundness gap, not a demonstrated runtime bug, and I don't have visibility into every downstream consumer of RepoWikiPacket.source.status.

Fix: either narrow validateRepoWikiPacketShape's status check to only accept fresh|stale|missing (rejecting "unknown" packets as invalid_packet), or widen RepoWikiSourceStatus to include "unknown" so the type accurately reflects what the guard allows through.

🔧 Proposed fix: reject "unknown" at the shape-validation boundary
-  if (!readFreshness(input.source.status)) return "source.status must be fresh, stale, missing, or unknown";
+  const rawStatus = input.source.status;
+  if (rawStatus !== "fresh" && rawStatus !== "stale" && rawStatus !== "missing") {
+    return "source.status must be fresh, stale, or missing";
+  }

Also applies to: 391-393, 432-434

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 9, 2026
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: 30124dee7f47bb6755d7330763e1e69933632cec
Updated: 2026-07-09T14:50:32.440Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: 30124dee7f47bb6755d7330763e1e69933632cec into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +20/-0 Documentation Low
docs/repo-wiki-packet.md modified +26/-8 Documentation Low
src/config.ts modified +25/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +442/-0 Runtime code Moderate: validated P3 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +69/-15 Runtime code Moderate: runtime path
src/zcode.ts modified +55/-27 Runtime code Moderate: validated P3 finding
tests/repo-wiki-context.test.ts added +554/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low
tests/zcode-output.test.ts modified +63/-1 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 0, P3: 3).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1
  • Security boundary: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread src/zcode.ts
Comment thread src/repo-wiki-context.ts Outdated
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: 18615bd371f4ebd4ac580249dfbd964d9aa33d2b
Updated: 2026-07-09T15:08:38.262Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 9, 2026

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: 18615bd371f4ebd4ac580249dfbd964d9aa33d2b into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +20/-0 Documentation Low
docs/repo-wiki-packet.md modified +26/-8 Documentation Low
src/config.ts modified +25/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +451/-0 Runtime code Moderate: validated P2 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +69/-15 Runtime code Moderate: runtime path
src/zcode.ts modified +63/-36 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +573/-0 Test coverage Elevated: large change
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low
tests/zcode-output.test.ts modified +64/-1 Test coverage Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 1, P3: 0).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 9, 2026
Comment thread src/repo-wiki-context.ts Fixed
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: stale head

PR: #474 - Add repo wiki advisory context packets
Head: d37056697905dcb3c2614f98224cff08e2e0a85e
Updated: 2026-07-09T15:30:39.534Z

evaOS review stopped because this queued head is no longer the live PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Details: live=e9a93109568bf5b9c0ff3f470b183b204d9b294d

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #474 - Add repo wiki advisory context packets
Head: e9a93109568bf5b9c0ff3f470b183b204d9b294d
Updated: 2026-07-09T15:47:43.464Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Review URL: #474 (review)

@100yenadmin

Copy link
Copy Markdown
Member Author

@coderabbitai review

CodeRabbit status is still pending on e9a93109568bf5b9c0ff3f470b183b204d9b294d after the CodeQL TOCTOU fix. All current threads are resolved and CI/CodeQL are green; requesting a fresh review/status refresh.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

@100yenadmin: Got it — triggering a fresh review on the latest head (e9a93109568bf5b9c0ff3f470b183b204d9b294d). If the status was stuck in pending, this should force CodeRabbit to re-evaluate the commit and post an updated status/check result.

✅ Action performed

Review finished.

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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 9, 2026

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #474 - Add repo wiki advisory context packets
Head: e9a93109568bf5b9c0ff3f470b183b204d9b294d into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
config.example.json modified +7/-0 Configuration Low
docs/neondiff-config.md modified +20/-0 Documentation Low
docs/repo-wiki-packet.md modified +26/-8 Documentation Low
src/config.ts modified +25/-1 Configuration Moderate: runtime path
src/repo-wiki-context.ts added +503/-0 Runtime code Moderate: validated P3 finding
src/review-mode-router.ts modified +2/-0 Runtime code Moderate: runtime path
src/review-mode-types.ts modified +2/-0 Runtime code Moderate: runtime path
src/worker.ts modified +69/-15 Runtime code Moderate: runtime path
src/zcode.ts modified +63/-36 Runtime code Moderate: runtime path
tests/repo-wiki-context.test.ts added +594/-0 Test coverage Moderate: validated P3 finding
tests/review-mode-router.test.ts modified +7/-1 Test coverage Low
tests/zcode-output.test.ts modified +64/-1 Test coverage Low

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 0, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 1
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Current-head, App-authored, no-secret, no-duplicate, and no-repo-mutation invariants outrank style feedback.
    Profile proof expectations: Require focused tests, TypeScript build, App-backed doctor, release-status proof, and launchd heartbeat before live promotion.

Related Context

Related issues/PRs: #415, #230.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: src/github.ts - Treat GitHub App identity or token-mode regressions as high risk.
  • Path instructions: src/state.ts - Check duplicate suppression, leases, processed heads, and migration safety.
  • Path instructions: src/worker.ts - Check stale-head guards, repo mutation protection, and review posting policy.
  • Path instructions: src/zcode.ts - Check read-only ZCode policy, prompt constraints, and output parsing.
  • Label suggestions: bot, regression-hardening, release
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread src/repo-wiki-context.ts Outdated
Comment thread tests/repo-wiki-context.test.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

evaOS review status: closed or merged before review

PR: #474 - Add repo wiki advisory context packets
Head: 1b39d00bf6022c4f88495988e01e066a4a6fef36
Updated: 2026-07-09T16:12:37.676Z

evaOS review stopped because the PR closed or merged before this queued head could be reviewed.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #474

Details: state=closed

@100yenadmin

Copy link
Copy Markdown
Member Author

Current-head closeout for #474:

  • Head 1b39d00bf6022c4f88495988e01e066a4a6fef36 is CLEAN / APPROVED.
  • All required checks are green, including CI, CodeQL, Socket, Swift gate, and CodeRabbit.
  • Current-head unresolved review threads: 0.
  • Local validation: focused repo-wiki stack 87 tests passed; npm run build, npm run check:secrets, and git diff --check passed.

This PR is ready for normal merge without admin merge or auto-merge. #480 remains stacked on this head.

@100yenadmin
100yenadmin merged commit fb2e023 into main Jul 9, 2026
10 checks passed
@100yenadmin
100yenadmin deleted the issue-415-openwiki-advisory-context branch July 9, 2026 16:13
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