Skip to content

feat(narrative): add deterministic approved fallback rendering - #73

Merged
seonghobae merged 12 commits into
mainfrom
feat/deterministic-narrative-fallback-20260814
Aug 16, 2026
Merged

feat(narrative): add deterministic approved fallback rendering#73
seonghobae merged 12 commits into
mainfrom
feat/deterministic-narrative-fallback-20260814

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

ADR-0018 requires an AI-independent deterministic narrative fallback, while protected main currently has only canonical style-assignment identity/key primitives. Open persistence/recovery PRs are review-blocked, so this independent downstream presentation slice advances the highest non-conflicting buyer-visible gap without duplicating psychometric numerics or choosing a style.

What

  • Add a deterministic narrative bundle that is pinned to narrative version, style-mapping version, approved interpretation-rule SHA-256 digest, and exact locale.
  • Verify the canonical ADR-0018 style-assignment key before rendering any participant-facing text.
  • Preserve primary/adjacent style references and ordered approved interpretation-unit evidence.
  • Fail closed on provenance mismatch, duplicate references, empty selection, missing approved units, malformed references/digests, or invalid display text.
  • Keep scientific score values entirely outside the renderer so fallback wording cannot mutate or replace the continuous/facet score source of truth.

This does not define the first Personality Style mathematical mapping, does not infer a psychometric type, does not claim MBTI equivalence, and does not call an LLM.

Verification intent

  • Test-first deterministic replay fixture.
  • Negative tests for key/provenance mismatch, duplicate/missing interpretation evidence, empty selection, invalid references/digest/text.
  • Repository exact-head CI/security/coverage/docstring gates after PR creation.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: CHILL

Plan: Pro Plus

Run ID: 84a94586-a316-4352-b738-01c895c9d9f1

📥 Commits

Reviewing files that changed from the base of the PR and between cc5850a and 58d0bfd.

📒 Files selected for processing (4)
  • src/deterministic_narrative.rs
  • src/lib.rs
  • tests/deterministic_narrative_fallback.rs
  • tests/deterministic_narrative_validation.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 58d0bfdec32a416d344ac8d4ef67a6d1576d3216.

  • Head SHA: 58d0bfdec32a416d344ac8d4ef67a6d1576d3216

  • Workflow run: 31868206377

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Test (2 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test (2 files)"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 58d0bfdec32a416d344ac8d4ef67a6d1576d3216
  • Workflow run: 31868206377
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 58d0bfdec32a416d344ac8d4ef67a6d1576d3216.

  • Head SHA: 58d0bfdec32a416d344ac8d4ef67a6d1576d3216

  • Workflow run: 31868206377

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Test (2 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test (2 files)"]
  R2 --> V2["targeted test run"]
Loading

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 16, 2026 14:03

Dismissed as obsolete blocker evidence after exact-head re-verification. This review's sole blocker is a failed coverage-evidence result from workflow run 31868206377 on head 58d0bfd. The unchanged exact same head now has coverage-evidence=success and opencode-review=success, with Runtime CI, Security Scan, and SAST Semgrep also successful and no failed, queued, in-progress, or null-conclusion exact-head checks. This dismissal does not add an approval or bypass a current failing gate; it removes a contradicted REQUEST_CHANGES state after the stated prerequisite became satisfied.

@seonghobae
seonghobae merged commit ce21cf1 into main Aug 16, 2026
30 checks passed
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.

1 participant