Skip to content

docs(rfc): propose profile artifacts and subject source writes - #1485

Merged
Teingi merged 4 commits into
masterfrom
codex/profile-artifact-rfc
Sep 8, 2026
Merged

Teingi merged 4 commits into
masterfrom
codex/profile-artifact-rfc

Conversation

@Zxf-xufeng

@Zxf-xufeng Zxf-xufeng commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

RFC-only proposal; no tracking issue.

Rationale for this change

Applications need to keep a user's message in a shared conversation Scope while accumulating the same evidence in an ordinary Scope addressed by a business subject key. Each Scope should be able to generate its own Profile and use existing Artifact APIs.

What changes are included in this PR?

  • Add matching English and Chinese RFCs for the profile Artifact Family, with one Profile snapshot per Scope.
  • Resolve subject_key through existing Scope Bindings (integration=subject, kind=user). Subject writes create or reuse a binding and reject an explicit Scope mismatch; management APIs retain rebind/unbind behavior.
  • Define one atomic subject Source endpoint that writes matching Source IDs and content to the business and subject Scopes, while preserving existing single-Scope endpoints.
  • Add only pc_profile_policies; reuse existing Artifact, Candidate, Source Cursor, Scope Binding, and scheduler tables, with concrete row examples and server-owned BLOB metadata.
  • Define configurable daily generation at 02:00 Asia/Shanghai, bounded Source windows, concurrent commit checks, review recovery, and rejection that consumes the window without retry.
  • Reuse Artifact CRUD and Candidate review. Add only subject Source creation, Policy GET/PUT, and Profile Flush. Extend existing Binding Resolve with backward-compatible allow_default to prevent subject lookups falling back to a default Scope.
  • Specify Python types, authorization, transaction boundaries, compatibility, limitations, and acceptance criteria.

Are there any user-facing changes?

This is a design proposal only; it changes no runtime code, OpenAPI contract, or persisted database schema. If implemented, it adds opt-in Profile behavior and a subject dual-write convenience endpoint. Existing binding management and single-Scope Source behavior are preserved. Multiple subjects may share a Scope; rebinding does not migrate historical data.

How was this change tested?

  • git diff --check
  • Bilingual heading, fence, table-count, and local-link checks; Python snippet syntax and JSON example parsing.
  • CI=true make docs-test (website lint, build, and static export verification).

AI usage statement

Codex was used to draft, translate, inspect repository contracts, and validate the RFC. The design incorporates the author's explicit decisions on Scope Binding behavior, subject writes, table reuse, and review semantics.

@Zxf-xufeng Zxf-xufeng changed the title docs(rfc): propose user profile artifacts docs(rfc): propose profile artifacts and subject source writes Sep 7, 2026
@Teingi
Teingi merged commit cd56df5 into master Sep 8, 2026
17 checks passed
@PsiACE
PsiACE deleted the codex/profile-artifact-rfc branch September 8, 2026 06:05
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