Skip to content

Preserve Slack harness context for live connector grounding - #51

Merged
jusso-dev merged 1 commit into
mainfrom
agent/preserve-slack-harness-context
Jul 27, 2026
Merged

Preserve Slack harness context for live connector grounding#51
jusso-dev merged 1 commit into
mainfrom
agent/preserve-slack-harness-context

Conversation

@jusso-dev

@jusso-dev jusso-dev commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What changed

  • Parse and preserve the persisted agent harness mode, including slack, in the agent gateway.
  • Route the durable runtime through one tested persisted-request parser.
  • Add a fast regression proving Slack mode survives parsing.
  • Add an integration regression proving a Slack run executes a synthetic non-mock Tawny connector query and records agent live-context metadata.

Root cause

The gateway's persisted-request Zod schema omitted harness. Zod stripped { harness: { mode: "slack" } } before live connector evidence loading. Slack transport and delivery succeeded, but Jessie received no Tawny, Kelpie, or UniFi evidence and produced ungrounded no-data replies.

Impact

Slack agent runs can now load governed live connector context without weakening organisation, capability, credential, or query-template controls.

Validation

  • pnpm --dir apps/agent-gateway typecheck
  • pnpm --dir apps/agent-gateway test -- src/runtime.integration.test.ts — 5 passed, 15 opt-in integration tests skipped without the database environment
  • git diff --check

A live Yarn Digi Slack smoke will be run after homelab deployment.

Summary by CodeRabbit

  • New Features

    • Added support for preserving request harness modes, including Slack, Hermes, MCP, CLI, and HTTP.
    • Slack-based runs can now load live connector data and retain associated request metadata.
  • Bug Fixes

    • Improved persisted request handling to safely recognize harness details during runtime processing.

@jusso-dev
jusso-dev merged commit f44fdc4 into main Jul 27, 2026
2 of 5 checks passed
@jusso-dev
jusso-dev deleted the agent/preserve-slack-harness-context branch July 27, 2026 07:39
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5333b010-e8c8-477d-aea8-9e4430b8e48d

📥 Commits

Reviewing files that changed from the base of the PR and between 6690da4 and 146d19f.

📒 Files selected for processing (2)
  • apps/agent-gateway/src/runtime.integration.test.ts
  • apps/agent-gateway/src/runtime.ts

📝 Walkthrough

Walkthrough

The durable runtime now shares persisted-request parsing through an exported Zod-backed helper that supports harness modes. Integration tests validate Slack harness preservation and connector evidence loading through a local HTTP connector and durable run.

Changes

Runtime harness support

Layer / File(s) Summary
Persisted request parsing contract
apps/agent-gateway/src/runtime.ts, apps/agent-gateway/src/runtime.integration.test.ts
Adds shared persisted-request parsing with optional harness modes and verifies Slack mode survives parsing.
Slack connector evidence integration
apps/agent-gateway/src/runtime.integration.test.ts
Adds target-agent room selection and an end-to-end Slack durable-run test covering encrypted credentials, connector responses, query results, metadata, and cleanup.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/preserve-slack-harness-context

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

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