Skip to content

docs: complete DESIGN_CORE_REFACTOR.md with implementation status and retrospective#384

Merged
hotlong merged 2 commits intomainfrom
copilot/update-design-core-refactor
Feb 13, 2026
Merged

docs: complete DESIGN_CORE_REFACTOR.md with implementation status and retrospective#384
hotlong merged 2 commits intomainfrom
copilot/update-design-core-refactor

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

The design doc header declared "✅ Completed" but Phase checklists and multiple sections still reflected the pre-implementation plan, not actual outcomes.

Updated the document to match the implemented state of the @objectql/core refactoring (PR #373):

  • §8 Migration Plan — Marked 25 phase items as complete; only v5.0 release tag remains pending (Q4 2026)
  • §4.1, §6.1–6.3, §7.1gateway.ts, ai/, protocol.ts were fully removed (original plan said keep); app.ts was transformed into a bridge class (original plan said remove); filter-translator.ts moved to plugin-query (original plan said remove)
  • §4.4 — Replaced aspirational TARGET code with actual post-refactoring index.ts and kernel-factory.ts
  • §1 Impact Summary — Actual metrics: 734 LOC (target was ~800), @objectstack/* ^3.0.2
  • §9.1 Risk Matrix — Added Outcome column confirming all risks mitigated
  • §10.3 — Replaced pre-refactoring API surface with post-refactoring file inventory
packages/foundation/core/src/        (734 LOC total)
├── index.ts            # 21 LOC  — Public API barrel
├── app.ts              # 168 LOC — Bridge class extending upstream ObjectQL
├── kernel-factory.ts   # 47 LOC  — Convenience kernel factory
├── plugin.ts           # 323 LOC — Plugin orchestrator
├── repository.ts       # 6 LOC   — Stub re-export
└── util.ts             # 169 LOC — Schema utilities
  • §11 (new) — Implementation Retrospective: deviations table, final architecture diagram, lessons learned

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectql Ready Ready Preview, Comment Feb 13, 2026 7:22am

Request Review

… retrospective

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update development documentation for design core refactor docs: complete DESIGN_CORE_REFACTOR.md with implementation status and retrospective Feb 13, 2026
Copilot AI requested a review from hotlong February 13, 2026 02:03
@hotlong
Copy link
Contributor

hotlong commented Feb 13, 2026

能否彻底删除 @objectql/core ,直接使用 @objectstack/objectql @copilot

Copy link
Contributor Author

Copilot AI commented Feb 13, 2026

能否彻底删除 @objectql/core ,直接使用 @objectstack/objectql @copilot

技术上可以,但需要较大范围的重构。当前 @objectql/core 仍提供以下不可直接替代的功能:

1. Bridge class (app.ts, 168 LOC) — 为 ObjectLoader 提供 MetadataRegistry 集成(文件系统加载 YAML → 同步到上游 SchemaRegistry)。上游 @objectstack/objectql.ObjectQL 没有 metadata 属性。

2. Plugin orchestrator (plugin.ts, 323 LOC) — 组合 QueryPlugin + ValidatorPlugin + FormulaPlugin,提供统一的 RuntimePlugin 入口。

3. Schema utilities (util.ts, 169 LOC)toTitleCase(), convertIntrospectedSchemaToObjects() 等,被 @objectql/platform-node 直接引用。

当前依赖规模: 9 个 package.json + 17 个 TypeScript 文件有 @objectql/core 的直接导入。

如要彻底删除,需要:

  • util.ts 迁移到 @objectql/types@objectql/platform-node
  • MetadataRegistry bridge 模式合并到上游 @objectstack/objectqlplatform-node
  • 将 plugin 组合逻辑移入各消费方或上游
  • 更新所有 17+ 个导入点

建议作为单独的 issue 跟踪此工作(对应 v5.0 计划),不在本文档 PR 中实施。

@hotlong hotlong marked this pull request as ready for review February 13, 2026 02:23
Copilot AI review requested due to automatic review settings February 13, 2026 02:23
@hotlong hotlong merged commit 06efc47 into main Feb 13, 2026
7 of 9 checks passed
@hotlong hotlong deleted the copilot/update-design-core-refactor branch February 13, 2026 02:23
Copy link
Contributor

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 DESIGN_CORE_REFACTOR.md so it reflects the implemented @objectql/core refactor (PR #373), including completion status, actual architecture, and a retrospective.

Changes:

  • Marks migration phases/items as completed and updates outcomes/metrics (LOC, deps, removed modules).
  • Replaces “target”/planned sections with “actual post-refactor” API/file inventory and notes.
  • Adds §11 retrospective (deviations, architecture diagram, lessons learned).

* await kernel.start();
*/
export function createObjectQLKernel(options: ObjectQLKernelOptions = {}): ObjectKernel {
return new (ObjectKernel as any)([
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This snippet uses new (ObjectKernel as any)(...), which is likely not copy/paste-compilable and makes the example hard to trust (if ObjectKernel is a type/interface, it’s not constructible; if it’s a class, the as any shouldn’t be needed). Consider updating the example to use the real constructible kernel class/export (whatever is actually instantiated in code) or add a brief note explaining why a cast is required here.

Suggested change
return new (ObjectKernel as any)([
return new ObjectKernel([

Copilot uses AI. Check for mistakes.
Comment on lines +793 to +795
export { ObjectRepository } from '@objectstack/objectql' // Context-scoped repository
export { ScopedContext } from '@objectstack/objectql' // Context factory
export { SchemaRegistry } from '@objectstack/objectql' // FQN-based object registry
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The doc lists ObjectRepository as exported twice, which is confusing in an API inventory. Consider keeping a single export entry and adding a note that repository.ts exists specifically for path compatibility (or explicitly show that the path-compat export is via ./repository rather than repeating the same upstream export).

Suggested change
export { ObjectRepository } from '@objectstack/objectql' // Context-scoped repository
export { ScopedContext } from '@objectstack/objectql' // Context factory
export { SchemaRegistry } from '@objectstack/objectql' // FQN-based object registry
// NOTE: `repository.ts` exists only to preserve the legacy
// import { ObjectRepository } from '@objectql/core/repository'
// path. It simply re-exports this upstream symbol and does not add
// a separate API surface.
export { ObjectRepository } from '@objectstack/objectql' // Context-scoped repository (canonical source)
export { ScopedContext } from '@objectstack/objectql' // Context factory
export { SchemaRegistry } from '@objectstack/objectql' // FQN-based object registry

Copilot uses AI. Check for mistakes.
export function convertIntrospectedSchemaToObjects(schema: any): ServiceObject[]

// ── Backward-Compat Stub ──
export { ObjectRepository } from '@objectstack/objectql' // (also in repository.ts for path compatibility)
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The doc lists ObjectRepository as exported twice, which is confusing in an API inventory. Consider keeping a single export entry and adding a note that repository.ts exists specifically for path compatibility (or explicitly show that the path-compat export is via ./repository rather than repeating the same upstream export).

Suggested change
export { ObjectRepository } from '@objectstack/objectql' // (also in repository.ts for path compatibility)
// ObjectRepository is re-exported via ./repository solely for path compatibility with v3.
// There is no additional direct export from the @objectql/core barrel.

Copilot uses AI. Check for mistakes.
- [ ] Tag v5.0 release
- [x] Update `@objectstack/*` dependency versions to ^3.0.2 (includes `replaceService` and type exports)
- [x] Remove local workarounds once upstream changes are released
- [ ] Tag v5.0 release (scheduled for Q4 2026 — see ROADMAP.md)
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This hard-coded schedule date is likely to become stale over time. Since you already reference ROADMAP.md, consider removing the explicit “Q4 2026” here (or rephrasing to defer entirely to the roadmap) so the plan stays accurate with fewer touchpoints.

Suggested change
- [ ] Tag v5.0 release (scheduled for Q4 2026 — see ROADMAP.md)
- [ ] Tag v5.0 release (timeline per ROADMAP.md)

Copilot uses AI. Check for mistakes.
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