Skip to content

feat(six-encounters): Wave 5 end-to-end Six Encounters publication package assembly - #68

Merged
4444J99 merged 1 commit into
mainfrom
feat/hole-loop-wave5-final-package
Oct 25, 2026
Merged

4444J99 merged 1 commit into
mainfrom
feat/hole-loop-wave5-final-package

Conversation

@4444J99

@4444J99 4444J99 commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Implements Wave 5: assembleSixEncountersPackage integrating C2 release gates, C3 route graph & studio review, and C4 sensory accessibility into a SHA-256 sealed publication bundle.

Summary by Sourcery

Assemble a deterministic, accessibility-validated Six Encounters publication bundle with release-gate verification and fail-closed readiness.

New Features:

  • Add end-to-end Six Encounters publication package assembly covering patch validation, route replay, perceptual rendering, studio review, sensory accessibility, documentation health, and release gates.
  • Expose publication assembly and release verification APIs through the generation facade.

Bug Fixes:

  • Ensure publication readiness fails closed when release metrics or sensory synchronization violate configured requirements.

Enhancements:

  • Produce deterministic SHA-256 digests for the release manifest, publication artifacts, and complete immutable package bundle.

Tests:

  • Add coverage for deterministic ready packages, sealed release artifacts, and failure scenarios involving performance gates and sensory drift.

@sourcery-ai

sourcery-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Sorry @4444J99, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 12 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T12:03:35.069188Z c01d551 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

❤️ Share

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

@sourcery-ai

sourcery-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Reviewer's Guide

Wave 5 introduces an end-to-end Six Encounters publication-package assembler that combines C2 release and documentation gates, C3 route/review artifacts, and C4 sensory checks into an immutable SHA-256-digested bundle, exposes it through the generation API, and tests deterministic success plus fail-closed violations.

Sequence diagram for Six Encounters publication package assembly

sequenceDiagram
    participant Caller
    participant Generation as HLGeneration
    participant Assembler as assembleSixEncountersPackage
    participant Gates as ReleaseGates
    participant Sensory as SensoryAccessibility
    participant Review as StudioReviewSession
    participant Digest as SHA256

    Caller->>Generation: assembleSixEncountersPackage(sessionInput)
    Generation->>Assembler: assembleSixEncountersPackage(sessionInput)
    Assembler->>Generation: validatePatchGrammar(rawPatch)
    Assembler->>Generation: compilePatchRecord(rawPatch)
    Assembler->>Generation: buildRouteGraph(version, seed)
    Assembler->>Generation: replayRouteHistory(version, seed, routeHistory)
    Assembler->>Generation: evaluatePerceptualField(encounterState, viewport)
    Assembler->>Generation: composeSpatialPoetryLayer(routeHistory, compiledPatch, spatialOptions)
    Assembler->>Sensory: verifyReducedMotionParity(spatialPoetryLayer, options)
    Assembler->>Sensory: compileCaptionTrack(routeHistory, timedTextNodes, options)
    Assembler->>Sensory: projectTactileSubBassEnvelope(encounterState, audioEvents, options)
    Assembler->>Sensory: auditSensoryEquivalence(captionTrack, tactileEnvelope, reducedMotionLayer, options)
    Assembler->>Review: createStudioReviewSession(options)
    Review-->>Assembler: exportReviewBundle()
    Assembler->>Gates: verifyDocumentationHealth(runbookTarget)
    Assembler->>Gates: evaluateReleaseGates(metrics)
    Assembler->>Gates: buildReleaseManifest(manifestInput)
    Assembler->>Digest: sha256Hex(canonicalJSON(packagePayload))
    Digest-->>Assembler: packageDigest
    Assembler-->>Caller: frozen publication package
Loading

Flow diagram for fail-closed package readiness

flowchart TD
    Start[assembleSixEncountersPackage]
    Patch[Validate and compile patch]
    Route[Build route graph and replay trajectory]
    Sensory[Run caption, tactile, reduced-motion, and equivalence checks]
    Review[Export deterministic studio review bundle]
    Gates[Evaluate release and documentation gates]
    Manifest[Build release manifest]
    Ready{All required checks pass?}
    Digest[Compute packageDigest with sha256Hex]
    Result[Return frozen package]

    Start --> Patch --> Route --> Sensory --> Review --> Gates --> Manifest --> Ready
    Ready -->|Yes| Digest --> Result
    Ready -->|No| Digest --> Result
Loading

File-Level Changes

Change Details Files
Adds end-to-end assembly of a deterministic, SHA-256-sealed Six Encounters publication package across release validation, route evaluation, studio review, documentation, and sensory accessibility.
  • Validates and compiles the canonical patch, then records a canonical patch digest.
  • Builds route graph and replay artifacts, evaluates the perceptual field, and composes spatial/reduced-motion layers.
  • Compiles captions, projects tactile audio, and performs cross-modal sensory equivalence auditing.
  • Creates a deterministic studio review bundle and verifies operator runbook health.
  • Evaluates release metrics, builds the release manifest, and computes readiness plus package and artifact digests.
  • Deep-freezes the returned package and exposes assembly APIs through both release gates and generation facades.
experimental/six-encounters/release-gates.js
Makes the Wave 5 package assembly and related release-gate functions available through the existing generation API in both Node and browser-style environments.
  • Loads release-gates conditionally alongside sensory accessibility support.
  • Adds explicit assembly, gate, manifest, rollback, and documentation-health exports to HLGeneration.
  • Merges release-gate exports into the shared generation facade.
experimental/six-encounters/generation.js
Adds end-to-end coverage for successful deterministic publication assembly and fail-closed behavior.
  • Verifies schema, readiness, manifest, sensory, documentation, gate, subsystem, and digest outputs.
  • Confirms identical inputs produce identical package digests.
  • Exercises release-gate failure from excessive frame time and sensory failure from synchronization drift.
experimental/six-encounters/tests/studio-release.test.cjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@4444J99
4444J99 merged commit 784e8f6 into main Oct 25, 2026
5 of 6 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: c01d551b32

ℹ️ 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 on lines +466 to +470
const metrics = Object.assign({
frameTimeMs: 14.2,
memoryMb: 120,
reducedMotionSupported: true,
contrastRatio: perceptualField?.colorContrast?.min || 7.0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require measured metrics before declaring a package ready

When input.metrics is absent or partial, the assembler supplies passing frame-time, memory, accessibility, and replay values without measuring or verifying them. Consequently, assembleSixEncountersPackage() reports ready: true and all six gates passed even though no runtime qualification occurred, bypassing the existing evaluator's fail-closed behavior for missing metrics. Require actual measurements for these gates, or keep unqualified packages explicitly not ready.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Comment on lines +514 to +519
const packageDigest = sha256Hex(canonicalJSON(packagePayload));

return freeze({
...packagePayload,
packageDigest,
subsystems: {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include publication subsystem artifacts in the package digest

The digest is computed before subsystems is added, and the payload contains no digest covering the spatial, reduced-motion, caption, or tactile artifacts. For example, assembling once with default options and once with spatialOptions: { fontSize: '50px' } produces different published visual artifacts but exactly the same packageDigest. This prevents the advertised package seal from detecting changes to substantial publication content. Include canonical serializable subsystem data, or individual artifact digests, in the hashed payload.

Useful? React with 👍 / 👎.

Comment on lines +460 to +463
if (!runbookTarget) {
runbookTarget = input.runbookText || REQUIRED_RUNBOOK_SECTIONS.map(s => `# ${s}\nContent`).join('\n\n');
}
const documentationHealth = verifyDocumentationHealth(runbookTarget);

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 Validate the supplied runbook instead of substituting documentation

When a caller supplies runbookText in this repository, automatic discovery selects docs/OPERATOR_RUNBOOK.md first, so even runbookText: '# Incomplete\nNo procedures' returns healthy documentation and a ready package. Conversely, when no file or text is available, the fallback invents all required headings and passes the check anyway. Prioritize explicitly supplied documentation and fail the documentation gate when no real runbook is available, rather than qualifying an unrelated file or generated placeholder.

Useful? React with 👍 / 👎.

This was referenced Oct 25, 2026
This was referenced Oct 25, 2026
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