Skip to content

docs: update architecture docs to match current codebase#361

Open
tonyxiao wants to merge 10 commits intomainfrom
docs-update
Open

docs: update architecture docs to match current codebase#361
tonyxiao wants to merge 10 commits intomainfrom
docs-update

Conversation

@tonyxiao
Copy link
Copy Markdown
Collaborator

@tonyxiao tonyxiao commented May 5, 2026

Summary

  • packages.md: full rewrite — added 6 missing packages (logger, openapi, hono-zod-openapi, test-utils, dashboard, visualizer), fixed all stale dependency claims (yesql removed, stripe SDK → undici, protocol deps updated), updated dependency graph and isolation rules
  • service/ARCHITECTURE.md: rewrote for current Temporal-based architecture (was referencing old StatefulSync class and apps/stateful path)
  • engine/ARCHITECTURE.md: fixed stale export names (forwardpipe, filterDataMessagesfilterType)
  • principles.md: added logger and openapi to approved shared utilities list
  • AGENTS.md (CLAUDE.md): updated package table with all missing packages and corrected deps
  • Removed deprecated docs: impl-status.md, service/overview.md
  • slides: added knowledge-transfer deck, bumped Docker node to 24

How to test (optional)

  • pnpm build passes
  • grep -r "yesql\|StatefulSync\|apps/stateful" docs/ returns nothing in active docs

tonyxiao and others added 6 commits May 4, 2026 19:43
- packages.md: add missing packages (logger, openapi, hono-zod-openapi,
  test-utils, dashboard, visualizer), fix stale dependency claims
  (yesql removed, stripe SDK → undici, protocol deps updated)
- service/ARCHITECTURE.md: rewrite for Temporal-based architecture
- engine/ARCHITECTURE.md: fix stale export names (forward→pipe, etc.)
- principles.md: add logger+openapi to approved shared utilities
- AGENTS.md: update package table and isolation rule
- Remove deprecated docs (impl-status.md, overview.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
The knowledge-transfer deck had drifted away from the current engine, webhook, and connector behavior. This updates the slides to match the actual code paths, adds concrete protocol examples, and marks deprecated protocol message wrappers so the presentation teaches the current direction instead of legacy shapes.

Constraint: Slides needed to stay faithful to current code paths while remaining presentation-readable
Rejected: Keep generic interface aliases and legacy protocol examples | too ambiguous for a codebase handoff
Rejected: Present webhook flow through Temporal/liveLoop | newer /pipeline_handle_events direction is the simpler story to teach
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep slides aligned with the actual protocol and API surfaces; if the message union or webhook entrypoints change again, update the deck at the same time
Tested: Built Slidev deck in Docker; verified preview served over HTTP on localhost:3030
Not-tested: Runtime behavior of the deprecated protocol annotations beyond type/docs usage
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
The protocol annotation updates changed generated schema descriptions for deprecated eof payloads. The pre-push hook rejects drift, so this records the regenerated engine and service OpenAPI artifacts alongside the slide/protocol update already on the branch.

Constraint: Repo pre-push hook requires generated OpenAPI files to match current source annotations
Rejected: Push docs/protocol changes without regenerating specs | hook blocks on generated drift
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any protocol description or schema metadata change that feeds OpenAPI should be followed immediately by ./scripts/generate-openapi.sh
Tested: Ran ./scripts/generate-openapi.sh and inspected generated engine/service OpenAPI diffs
Not-tested: Full downstream client compatibility beyond generated type refresh
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@tonyxiao tonyxiao changed the title Docs update docs: update architecture docs to match current codebase May 5, 2026
@tonyxiao tonyxiao marked this pull request as ready for review May 5, 2026 09:18
Copilot AI review requested due to automatic review settings May 5, 2026 09:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s architecture documentation to reflect the current Temporal-based service + engine design, refreshes the monorepo package/dependency graph, and adds/adjusts Slidev-based knowledge-transfer slides (including Docker build/runtime updates).

Changes:

  • Rewrites architecture docs (docs/architecture/*, docs/service/*, docs/engine/*, AGENTS.md) to align with current packages, exports, and Temporal orchestration.
  • Adds a new Slidev knowledge-transfer deck + outline and tweaks Slidev styling and Docker build images.
  • Updates protocol/OpenAPI wording around legacy EOF-related schemas/messages and aligns a workflow failure check with the newer EOF status field.

Reviewed changes

Copilot reviewed 15 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/protocol/src/protocol.ts Adds deprecation annotations / updated descriptions for legacy terminal/push-input message types.
docs/slides/style.css Adjusts mermaid sizing and enables vertical scrolling for overflow content.
docs/slides/package.json Adds a new script to run the knowledge-transfer slide deck.
docs/slides/knowledge-transfer.md New knowledge-transfer slide deck describing protocol, components, and deployment surfaces.
docs/slides/knowledge-transfer-outline.md New outline document for the knowledge-transfer deck.
docs/slides/Dockerfile Bumps slide build/runtime Docker base images to Node 24.
docs/service/scenarios.md Updates referenced “key file” from legacy service class to store interfaces.
docs/service/overview.md Removes deprecated/obsolete service overview doc.
docs/service/ARCHITECTURE.md Rewrites service architecture section for Temporal-based orchestration and current file layout.
docs/engine/ARCHITECTURE.md Updates docs to current engine exports/util names (pipe, filterType, etc.).
docs/architecture/principles.md Updates connector isolation rule text to include approved shared utilities.
docs/architecture/packages.md Major rewrite of package inventory + dependency layering to match current monorepo.
docs/architecture/impl-status.md Removes deprecated/obsolete implementation status doc.
apps/service/src/temporal/workflows/pipeline-backfill.ts Updates terminal failure detection to use eof.status.
apps/service/src/generated/openapi.json Regenerates OpenAPI with updated EOF schema descriptions.
apps/service/src/generated/openapi.d.ts Regenerates OpenAPI types with updated EOF schema descriptions.
apps/engine/src/generated/openapi.json Regenerates OpenAPI with updated EOF schema descriptions.
apps/engine/src/generated/openapi.d.ts Regenerates OpenAPI types with updated EOF schema descriptions.
AGENTS.md Updates the package table + isolation wording to match current packages/deps.
Files not reviewed (2)
  • apps/engine/src/generated/openapi.json: Language not supported
  • apps/service/src/generated/openapi.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 436 to 460
@@ -451,8 +452,11 @@ export const EofPayload = z
),
request_progress: ProgressPayload.describe('Progress for this specific request only.'),
})
.describe('Terminal message signaling end of this request.')
.describe(
'Deprecated terminal message signaling end of this request. Prefer explicit request/response results via pipeline_sync_batch.'
)
.meta({ id: 'EofPayload' })
/** @deprecated Legacy terminal payload. Prefer explicit request/response results via pipeline_sync_batch. */
export type EofPayload = z.infer<typeof EofPayload>
Comment on lines +5 to +6
- as a library (replit, supabasea)
- as cli (direct users, contributors)
Comment on lines +29 to +33
- source-stripe | postgres destiination
- Putting it all together
- scheduled sync
- start new sync run
- 1000 state messages per pipeline_sync requedst
- real time
- `/pipeline_handle_events`
- Experimental
- When we started the sync engine, the vision is to become an ubiquitous utility to help user “get your data where you need it, in real time, with a consistent schema”
const engine = await createEngine(resolver)
const eof = await engine.pipeline_sync_batch(pipeline, { run_id: 'run_demo' })
```
- as cli

## Experimental

- When we started the sync engine, the vision is to become an ubiquitous utility to help user “get your data where you need it, in real time, with a consistent schema”
tonyxiao and others added 4 commits May 5, 2026 11:34
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Records must be nested as `{"type":"record","record":{...}}` per the
RecordMessage schema, and the catalog needs `newer_than_field` with a
matching timestamp in record data for destination-postgres upserts.

Also adds dummy-source demo scripts and reorders KT slides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
This pass simplifies the opening slide, tightens the webhook and subdivision explanations, and adjusts layout choices so the deck behaves better in Slidev during an actual presentation rather than just reading well in source form.

Constraint: Slides need to fit the live Slidev rendering model, not just look correct in markdown
Rejected: Leave the slide structure as-is and rely on browser refreshes | rendering/layout issues were slide-source problems, not just stale client state
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep presentation changes grouped and verify them in the running Slidev preview before committing
Tested: Rebuilt Slidev deck in Docker repeatedly and verified preview responses on localhost:3030
Not-tested: Remote browser rendering differences beyond the local preview
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
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