Skip to content

fix: separate install callability from content maturity#209

Merged
100yenadmin merged 3 commits into
masterfrom
fix/doctor-content-readiness-gate
Jul 21, 2026
Merged

fix: separate install callability from content maturity#209
100yenadmin merged 3 commits into
masterfrom
fix/doctor-content-readiness-gate

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

TL;DR

Eva Brain can be fully callable while gbrain doctor returns nonzero for scheduled content-maintenance gaps such as a source that has not run a dream cycle. The updater previously treated that as an install failure. This PR makes the installer prove the actual release contract: the CLI opens, doctor returns a valid diagnostic, configured sources are searchable, required AGENTS guidance is present, and required plugins load. It still fails closed on every unknown, schema, migration, index, database, timeout, malformed, or non-diagnostic doctor failure.

Closes #208.

flowchart LR
  U["Eva updater"] --> D["Run gbrain doctor"]
  D -->|"invalid or runtime failure"| F["Stop install"]
  D -->|"only explicit content freshness gaps"| H["Run source-aware health gate"]
  H --> S["Search required sources"]
  H --> P["Inspect required OpenClaw plugin"]
  S --> R["Release-ready install"]
  P --> R
Loading

Why

The local 0.42.63.2 canary proved real callability through three independent surfaces:

  • CLI source-scoped search returned Support KB and workspace-doc results.
  • Codex MCP query returned the expected Support KB protocol page.
  • An OpenClaw agent turn called gbrain_query successfully.

The same install reported a doctor score of 5 because the imported sources had not run optional dream cycles and because the active schema pack had no successor capable of remediating its custom type drift. Treating that score as an install/runtime failure gave operators a false negative and encouraged expensive content mutation that was unrelated to callability.

What changed

  • The updater always runs the source-aware health gate unless --skip-health is explicitly passed.
  • Doctor JSON must contain the documented checks array and must not time out or terminate by signal.
  • A nonzero doctor exit is allowed only when it includes at least one failure and every failure is one of:
    • sync_freshness
    • cycle_freshness
    • links_extraction_lag
  • Every other and every unknown doctor failure blocks the updater.
  • Required Support KB/workspace-doc searches and OpenClaw plugin inspection remain hard gates.
  • type_proliferation no longer fails or suggests a no-op onboard command when the active schema pack has no built-in successor/remediation. Structured counts and pack identity remain visible.
  • Removed updater calls to obsolete sources cycle-freshness and sources sync-freshness subcommands.
  • Aligned root/plugin/skill version metadata at 0.42.63.3.

Safety boundary

This PR does not rebuild or mutate PGLite, change embedding configuration, run extraction/dream cycles, alter retrieval ranking, change the OpenClaw/Codex adapter contract, or touch the fleet.

Validation

Focused local checks on 4244d22a:

  • git diff --check
  • bash -n scripts/update-local-install.sh
  • bun test test/onboard-pack-upgrade-checks.test.ts test/local-updater-contract.test.ts
  • Result: 40 passed, 0 failed, 262 assertions.

Regression coverage proves:

  • explicit content freshness failures remain advisory after callability passes;
  • timeline_dedup_index remains blocking even when source search succeeds;
  • malformed doctor output remains blocking;
  • parseable error JSON without a checks array remains blocking;
  • high custom type drift remains blocking when a real built-in pack upgrade exists;
  • high custom type drift is non-blocking when no built-in remediation exists.

An independent read-only release/runtime review found one P1 and one follow-up P2 during development. Both were fixed; its final targeted delta review returned no findings and recommended advancing subject to CI.

GitHub Actions remains authoritative for the full Test, E2E, CodeQL, gitleaks, Socket, and review gates.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

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: 18 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: 09a491fe-ffe6-4319-bdd2-bfb6cd823ab8

📥 Commits

Reviewing files that changed from the base of the PR and between 9316d0c and c962fcb.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • VERSION
  • docs/downstream-carry-patches.md
  • openclaw.plugin.json
  • package.json
  • plugins/gbrain-codex/.codex-plugin/plugin.json
  • plugins/gbrain-codex/package.json
  • plugins/openclaw-gbrain/package.json
  • scripts/eva-brain-health.mjs
  • scripts/update-local-install.sh
  • skills/manifest.json
  • src/core/onboard/checks.ts
  • test/local-updater-contract.test.ts
  • test/onboard-pack-upgrade-checks.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/doctor-content-readiness-gate

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

@evaos-code-review-bot

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

Copy link
Copy Markdown

evaOS review status: completed

PR: #209 - fix: separate install callability from content maturity
Head: 4244d22ae92825b6a289ceb71d7e4208d16b75dd
Updated: 2026-07-21T20:36:11.509Z

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: #209

Review URL: #209 (review)

@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: 4244d22ae9

ℹ️ 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 scripts/update-local-install.sh

@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: #209 - fix: separate install callability from content maturity
Head: 4244d22ae92825b6a289ceb71d7e4208d16b75dd into master. 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
CHANGELOG.md modified +10/-0 Documentation Low
VERSION modified +1/-1 Changed file Low
docs/downstream-carry-patches.md modified +6/-0 Documentation Low
openclaw.plugin.json modified +1/-1 Changed file Low
package.json modified +1/-1 Configuration Low
plugins/gbrain-codex/.codex-plugin/plugin.json modified +1/-1 Changed file Low
plugins/gbrain-codex/package.json modified +1/-1 Configuration Low
plugins/openclaw-gbrain/package.json modified +1/-1 Configuration Low
scripts/eva-brain-health.mjs modified +36/-2 Changed file Moderate: validated P2 finding
scripts/update-local-install.sh modified +14/-44 Changed file Low
skills/manifest.json modified +1/-1 Changed file Low
src/core/onboard/checks.ts modified +43/-2 Runtime code Moderate: validated P3 finding
test/local-updater-contract.test.ts modified +213/-49 Test coverage Elevated: large change
test/onboard-pack-upgrade-checks.test.ts modified +40/-0 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

  • API compatibility: 1
  • Runtime correctness: 2

Validation and Proof

2 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.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 2 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #208.
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); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • 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 scripts/eva-brain-health.mjs
Comment thread scripts/eva-brain-health.mjs
Comment thread src/core/onboard/checks.ts Outdated
@evaos-code-review-bot

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

Copy link
Copy Markdown

evaOS review status: completed

PR: #209 - fix: separate install callability from content maturity
Head: 7faefa900ac27378c38c859a078c7c8660a7dad3
Updated: 2026-07-21T20:47:08.065Z

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: #209

Review URL: #209 (review)

@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: 7faefa900a

ℹ️ 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 src/core/onboard/checks.ts Outdated
Comment thread scripts/update-local-install.sh
Comment thread scripts/eva-brain-health.mjs Outdated

@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: #209 - fix: separate install callability from content maturity
Head: 7faefa900ac27378c38c859a078c7c8660a7dad3 into master. 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
CHANGELOG.md modified +10/-0 Documentation Low
VERSION modified +1/-1 Changed file Low
docs/downstream-carry-patches.md modified +6/-0 Documentation Low
openclaw.plugin.json modified +1/-1 Changed file Low
package.json modified +1/-1 Configuration Low
plugins/gbrain-codex/.codex-plugin/plugin.json modified +1/-1 Changed file Low
plugins/gbrain-codex/package.json modified +1/-1 Configuration Low
plugins/openclaw-gbrain/package.json modified +1/-1 Configuration Low
scripts/eva-brain-health.mjs modified +36/-2 Changed file Moderate: validated P3 finding
scripts/update-local-install.sh modified +17/-44 Changed file Low
skills/manifest.json modified +1/-1 Changed file Low
src/core/onboard/checks.ts modified +43/-2 Runtime code Moderate: runtime path
test/local-updater-contract.test.ts modified +269/-49 Test coverage Elevated: large change
test/onboard-pack-upgrade-checks.test.ts modified +40/-0 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

2 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.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 2 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #208.
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); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • 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 scripts/eva-brain-health.mjs
@evaos-code-review-bot

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

Copy link
Copy Markdown

evaOS review status: completed

PR: #209 - fix: separate install callability from content maturity
Head: c962fcba83d492ce8caf41161c07de30fbd2a2e5
Updated: 2026-07-21T20:57:05.462Z

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: #209

Review URL: #209 (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: #209 - fix: separate install callability from content maturity
Head: c962fcba83d492ce8caf41161c07de30fbd2a2e5 into master. 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
CHANGELOG.md modified +10/-0 Documentation Low
VERSION modified +1/-1 Changed file Low
docs/downstream-carry-patches.md modified +6/-0 Documentation Low
openclaw.plugin.json modified +1/-1 Changed file Low
package.json modified +1/-1 Configuration Low
plugins/gbrain-codex/.codex-plugin/plugin.json modified +1/-1 Changed file Low
plugins/gbrain-codex/package.json modified +1/-1 Configuration Low
plugins/openclaw-gbrain/package.json modified +1/-1 Configuration Low
scripts/eva-brain-health.mjs modified +58/-2 Changed file Moderate: validated P3 finding
scripts/update-local-install.sh modified +19/-46 Changed file Low
skills/manifest.json modified +1/-1 Changed file Low
src/core/onboard/checks.ts modified +45/-2 Runtime code Moderate: validated P3 finding
test/local-updater-contract.test.ts modified +351/-50 Test coverage Elevated: large change
test/onboard-pack-upgrade-checks.test.ts modified +42/-0 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

  • API compatibility: 1
  • Release regression: 1

Validation and Proof

2 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.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 2 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #208.
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); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • 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 scripts/eva-brain-health.mjs
Comment thread src/core/onboard/checks.ts
@100yenadmin
100yenadmin merged commit 982a838 into master Jul 21, 2026
30 checks passed

@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: c962fcba83

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

return
fi
run env GBRAIN_BIN="$HOME/.bun/bin/gbrain" node scripts/eva-brain-health.mjs "${health_args[@]}"
run env GBRAIN_BIN="$HOME/.bun/bin/gbrain" bun scripts/eva-brain-health.mjs "${health_args[@]}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor --skip-doctor in the health gate

When an operator passes --skip-doctor without also passing --skip-health, the explicit doctor step is skipped but this default health command still launches scripts/eva-brain-health.mjs, which unconditionally runs gbrain doctor --json. After the removed auto-skip above, this now affects ordinary updates with no source package requested, so --skip-doctor no longer does what the usage promises and can still fail or lock on the very doctor check the operator tried to bypass; either pass a skip flag/env into the health script or skip this gate when doctor is disabled.

Useful? React with 👍 / 👎.

@100yenadmin
100yenadmin deleted the fix/doctor-content-readiness-gate branch July 21, 2026 21:00
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.

Separate install callability from doctor content maturity

1 participant