You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spec(kernel/data): let a server-constructed in-product AI path set ExecutionContext.performedBy / HookContext.provenance (AI on behalf of a person, conversation id, confirmation id), and amend the ADR-0090 D10 rule 4 "/mcp OAuth door only" reading #33786
carries items a and b of #33694; #33694 keeps the plugin-audit writer half
Filing gate: ④ a split of #33694 (cloud#3826 phase 2, pre-graded p2 by the account owner: 「分拆的任务能否直接标记为高优先级让车队开放」). Area S1 of domain:server#5 split it, and the seat agreed in its thread at 10:44Z. Grading and lane are triage's.
维护者速读
产品内 AI 替某人改数据时,要在写入上下文里标明「AI 替谁做的、哪次对话、哪次确认」,审计日志才能记下来。
a. Schema.packages/spec/src/kernel/execution-context.zod.tsExecutionContext.performedBy and packages/spec/src/data/hook.zod.tsHookContext.provenance (performedByClientId) carry only the OAuth client today. Add the in-product AI attribution: AI on behalf of a person, a conversation id and a confirmation id. Use the existing performed_by / on_behalf_of pair. #33694 says: "Do not add a new actor vocabulary."
This widens a published schema, so it is Clause-②: yes, with a contract review at tier.
b. Ruling. Both jsdocs say the attribution is "Set only at the /mcp OAuth door ... Server-constructed only" (ADR-0090 D10 rule 4).
The producer here is cloud's in-product AI path, not the /mcp door. So (b) is a reading of ADR-0090 D10 and needs a ruling, and possibly an ADR addendum.
Two things stay as they are: the attribution stays server-constructed and is never client-supplied, and it never becomes the authorization subject.
Triage: first touch → domain:spec · p2 · 2026-11-15T11:49Z
⛔ Not a claim.
The spec half of #33694 (cloud#3826 phase 2, owner-ruled): a server-constructed in-product AI path may set ExecutionContext.performedBy / HookContext.provenance, with the ADR-0090 D10 rule-4 reading amended. p2, like #33694.
Claim: PM loop round 1 · 2026-11-15T14:22Z
Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); a card thread of this account's project is the dev and reports its session id
Account: os-steve
Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the dev builds
Worktree: objectstack-issue-33786
Domain: domain:spec
Seat: domain:spec#2
File surface: packages/spec/src/kernel/execution-context.zod.ts (performedBy), packages/spec/src/data/hook.zod.ts (HookContext.provenance), their tests, regenerated spec references, root .changeset/. ⛔ Not docs/adr/** (the ADR-0090 D10 rule 4 note is a skills-lane carrier) and not packages/plugins/plugin-audit/** (#33694 keeps the writer half)
Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
Clause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6893867283
Premise: holds at origin/main895783a: execution-context.zod.tsperformedBy carries only clientId and its .describe says "Set only at the /mcp OAuth door"; hook.zod.tsprovenance carries only performedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record in docs/adr/0011-actions-as-ai-tools.md ~:239. Item b is read as governed by that ruling; the dev stops with needs_decision if a ruling of record refuses it. Order: /mnt/project-files/spec-seat2/33786-delta.md (project share).
Serial constraints cleared: #33694 waits on this card (Blocked-by: #33786); no open PR or pm:dispatched claim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).
Claim: PM loop round 1 · 2026-11-15T14:24Z (names the branch; supersedes claim 6896002823, same session)
Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmRAvNc1qLS722dnoqn is the dev
Account: os-steve
Branch: claude/project-thread-hictiz (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33786-*)
Worktree: objectstack-issue-33786
Domain: domain:spec
Seat: domain:spec#2
File surface: packages/spec/src/kernel/execution-context.zod.ts (performedBy), packages/spec/src/data/hook.zod.ts (HookContext.provenance), their tests, regenerated spec references, root .changeset/. ⛔ Not docs/adr/** (the ADR-0090 D10 rule 4 note is a skills-lane carrier) and not packages/plugins/plugin-audit/** (#33694 keeps the writer half)
Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
Clause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6896002823
Premise: holds at origin/main895783a: execution-context.zod.tsperformedBy carries only clientId and its .describe says "Set only at the /mcp OAuth door"; hook.zod.tsprovenance carries only performedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record in docs/adr/0011-actions-as-ai-tools.md ~:239. Item b is read as governed by that ruling; the dev stops with needs_decision if a ruling of record refuses it. Order: /mnt/project-files/spec-seat2/33786-delta.md (project share).
Serial constraints cleared: #33694 waits on this card (Blocked-by: #33786); no open PR or pm:dispatched claim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).
{
"issue": 33786,
"status": "done",
"branch": "claude/project-thread-hictiz",
"pr": "https://github.com/objectstack-ai/objectstack/pull/34018",
"head": "93b0b119",
"session": "session_01ADHkmRAvNc1qLS722dnoqn",
"premise_still_valid": true,
"summary": "ExecutionContext.performedBy gains optional agentId, conversationId and confirmationId beside clientId, which becomes optional; a requiredOneOf(['clientId','agentId']) refinement keeps a performer-less performedBy refused and projects into the published JSON Schema. HookContext.provenance mirrors them as performedByAgentId / performedByConversationId / performedByConfirmationId; objectql buildProvenance copies them and the sandbox body face carries them, so the declared keys are live (on main ObjectQL#createContext's parse dropped an agentId). jsdoc and .describe name both producers (the /mcp OAuth door, the server-constructed in-product AI path running as the person) and cite the cloud#3826 ruling chain in jsdoc only. No stop: ADR-0151 D5 refuses performedBy for an account that is its own subject, not for an AI acting as the person; no [ruled] note refuses this case.",
"tests": "At ca6e40c9 under os-verify-lock (turbo test --only): spec 842 files/26965 passed (1 todo); objectql 596/13174; core 147/3402; mcp 65/1185; rest 412/8442 (332 skipped); plugin-audit 94/1541; runtime 605/10958 (19 skipped); plugin-auth 277/5485 (10 skipped); cli unit test/lowered-body-face-enumeration.test.ts 4/4. Typecheck of those 9 packages exit 0. After merging main 0ac112fc (head 93b0b119): check:generated 14/14 up to date, closure build 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal.integration 1/1, objectql+runtime typecheck exit 0. Ablations via ablation-replace.mjs (restored, blob == HEAD, git diff HEAD empty): (1) objectql drops the agentId copy -> engine pin red; (2) refine -> () => true -> 'REJECTS a performedBy naming no performer' red 1/46; (3) body-runner drops performedByAgentId -> cli face 3 failed/4. Type reverse check in objectql against the rebuilt spec dist: TS2353 on probeBogusKey only; valid keys and a performedBy?.agentId reader compile.",
"gates": "dispatch-gates --commands at 93b0b119: 118 families, all run; 116 exit 0 first time; check-plugin-teardown-shape --self-test exit 3 (fixture not fetched) -> exit 0 after git fetch --depth=1 of 621a4876; check:dual-build-cjs-loads exit 3 (no dist for studio, embedder-openai, knowledge-ragflow, scenarios) -> exit 0 after building them. --ran: 118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN. check-changeset-no-major --event (PR body) exit 0: Clause-② yes, Metadata-protocol none, patch. PR check-runs: in_progress at report time.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "6 — reads only: issue_read get #33786, get_comments #33786 (x2), get #33694, get #33808; pull_request_read get #34018",
"api_writes": "3 REST writes through the fleet-write relay: POST /pulls (pr_create #34018), POST /issues/34018/assignees (os-steve, same action), POST /issues/33786/comments (this report). git push is not REST.",
"files_changed": [
".changeset/33786-in-product-ai-performed-by.md",
"content/docs/references/data/data-engine.mdx (regenerated)",
"content/docs/references/data/hook.mdx (regenerated)",
"content/docs/references/kernel/execution-context.mdx (regenerated)",
"packages/spec/src/kernel/execution-context.zod.ts",
"packages/spec/src/kernel/execution-context.test.ts",
"packages/spec/src/data/hook.zod.ts",
"packages/spec/src/data/hook.test.ts",
"packages/objectql/src/engine-execution-plumbing.ts",
"packages/objectql/src/engine.test.ts",
"packages/runtime/src/sandbox/body-runner.ts",
"packages/runtime/src/sandbox/script-runner.ts",
"packages/cli/test/lowered-body-face-enumeration.test.ts (forced test edit)"
],
"line_budget": "n/a — no skills/** or governed path touched; +294/-49 over 13 files",
"deviations": [
"File surface wider than the claim: objectql engine-execution-plumbing.ts (+test), runtime sandbox body-runner.ts/script-runner.ts, cli face test. Needed so the new HookContext keys are populated (buildProvenance's own ADR-0049 note) and the body face stays complete (cli pin). Seat to amend the claim's File surface.",
"Two gates first exited 3 on prerequisites and were rerun green (see gates); the --ran file records the rerun codes.",
"cli: only the changed test file ran locally (unit); the rest of the cli unit layer is left to CI."
],
"open_questions": [
{ "question": "Shape: optional siblings or a union?", "options": ["A optional siblings + requiredOneOf(clientId, agentId) (shipped)", "B discriminated union { clientId } | { agentId, conversationId?, confirmationId? }"], "recommendation": "A, because B makes every performedBy?.clientId reader a TS error on the other arm and adds a discriminant, i.e. new vocabulary; A keeps readers compiling and the published schema states the rule exactly. Cost of A: clientId is string | undefined in the type." },
{ "question": "Key names (seat's call)", "options": ["A agentId / conversationId / confirmationId (shipped; ToolExecutionContext vocabulary + the card's wording)", "B agentName / conversationId / pendingId (ActionConfirmationPending key)"], "recommendation": "A, because agentId and conversationId are the values the in-product path already holds by those names, and the id names a decided confirmation, not a pending one." },
{ "question": "Hook-side names", "options": ["A flattened performedByAgentId / performedByConversationId / performedByConfirmationId (shipped)", "B nested provenance.performedBy object"], "recommendation": "A, the existing performedByClientId flattening." },
{ "question": "Metadata-protocol reading", "options": ["A none (shipped; server-built envelopes, no authorable-surface shard moved, level gate green at patch)", "B added, following the #31740 HookContext.session.principalKind precedent (spec minor)"], "recommendation": "A, unless the seat holds hook-readable members to be protocol; then flip the line and the spec level together." }
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: domain:skills lane · ADR-0090 D10 rule 4 amendment note: the owner's ruling on cloud#3826 adds the server-constructed in-product AI path (principalKind human, running as the person) as a second performedBy producer; cite PR #34018's merge commit. Noted, not filed.",
"carrier: #33694 · the writer half should keep the in-product agent id apart from OAuth client ids in sys_audit_log.metadata (ADR-0151 D5 reason 2 refuses two id namespaces in one performed_by key), and record conversationId/confirmationId. Noted, not filed."
]
}
Claim: PM loop round 2 · 2026-11-15T16:25Z (widens the file surface to what PR #34018 measured necessary to populate the new hook keys; supersedes the previous claim, same session and branch)
Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmRAvNc1qLS722dnoqn is the dev
Account: os-steve
Branch: claude/project-thread-hictiz (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33786-*)
Worktree: objectstack-issue-33786
Domain: domain:spec
Seat: domain:spec#2
File surface: packages/spec/src/kernel/execution-context.zod.ts (performedBy), packages/spec/src/data/hook.zod.ts (HookContext.provenance), their tests, regenerated spec references; the copy of ExecutionContext.performedBy into hook provenance only: packages/objectql/src/engine-execution-plumbing.ts (buildProvenance), packages/runtime/src/sandbox/body-runner.ts, packages/runtime/src/sandbox/script-runner.ts, their tests, and the forced pin edit in packages/cli/test/lowered-body-face-enumeration.test.ts; root .changeset/. ⛔ Not docs/adr/** (the ADR-0090 D10 rule 4 note is a skills-lane carrier) and not packages/plugins/plugin-audit/** (#33694 keeps the writer half)
Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
Clause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6897591859
Premise: holds at origin/main895783a: execution-context.zod.tsperformedBy carries only clientId and its .describe says "Set only at the /mcp OAuth door"; hook.zod.tsprovenance carries only performedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record in docs/adr/0011-actions-as-ai-tools.md ~:239. Item b is read as governed by that ruling; the dev stops with needs_decision if a ruling of record refuses it. Order: /mnt/project-files/spec-seat2/33786-delta.md (project share).
Serial constraints cleared: #33694 waits on this card (Blocked-by: #33786); no open PR or pm:dispatched claim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).
Restamp for head 75dcf73. This supersedes report 6897591859.
{
"issue": 33786,
"status": "done",
"branch": "claude/project-thread-hictiz",
"pr": "https://github.com/objectstack-ai/objectstack/pull/34018",
"head": "75dcf734",
"session": "session_01ADHkmRAvNc1qLS722dnoqn",
"premise_still_valid": true,
"summary": "ExecutionContext.performedBy gains optional agentId, conversationId and confirmationId beside clientId, which becomes optional; a requiredOneOf(['clientId','agentId']) refinement keeps a performer-less performedBy refused and projects into the published JSON Schema. HookContext.provenance mirrors them as performedByAgentId / performedByConversationId / performedByConfirmationId; objectql buildProvenance copies them and the sandbox body face carries them, so the declared keys are live (on main ObjectQL#createContext's parse dropped an agentId). jsdoc and .describe name both producers (the /mcp OAuth door, the server-constructed in-product AI path running as the person) and cite the cloud#3826 ruling chain in jsdoc only. No stop: ADR-0151 D5 refuses performedBy for an account that is its own subject, not for an AI acting as the person; no [ruled] note refuses this case. Round 2 (contract review 6897691839, S1/S2) reworded only the prose: the in-product producer stamps a request-named id only after the server resolved it for the person in userId, and the descriptions no longer say the audit writer records the new keys. Round-2 review 6898426121 PASS on ceeec029. 75dcf734 is a merge-only commit (main 529ed7d9) under the seat's K >= 15 rule; all 13 PR files are byte-identical to ceeec029.",
"tests": "At ca6e40c9 under os-verify-lock (turbo test --only): spec 842 files/26965 passed (1 todo); objectql 596/13174; core 147/3402; mcp 65/1185; rest 412/8442 (332 skipped); plugin-audit 94/1541; runtime 605/10958 (19 skipped); plugin-auth 277/5485 (10 skipped); cli unit test/lowered-body-face-enumeration.test.ts 4/4. Typecheck of those 9 packages exit 0. After merging main 0ac112fc (head 93b0b119): check:generated 14/14 up to date, closure build 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal.integration 1/1, objectql+runtime typecheck exit 0. Ablations via ablation-replace.mjs (restored, blob == HEAD, git diff HEAD empty): (1) objectql drops the agentId copy -> engine pin red; (2) refine -> () => true -> 'REJECTS a performedBy naming no performer' red 1/46; (3) body-runner drops performedByAgentId -> cli face 3 failed/4. Type reverse check in objectql against the rebuilt spec dist: TS2353 on probeBogusKey only; valid keys and a performedBy?.agentId reader compile. Round 2: spec pins 146/146 on bfaef935; on ceeec029 (main b4ce310b merged) the closure build was 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal 1/1, objectql and runtime typecheck exit 0; on 75dcf734 the spec build and check:generated were 14/14 up to date and the spec pins 146/146.",
"gates": "Round 1 at 93b0b119: 118/118 run, 0 NOT-MEASURED (two first exited 3 on prerequisites and were rerun green). On ceeec029: dispatch-gates --commands 118 families, all exit 0 on the first run; --ran 118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN. On 75dcf734 (merge-only, PR files byte-identical): no local re-derivation; CI is in progress on this head. CI on ceeec029: 58 success / 10 skipped / 0 failed (per review 6898426121).",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "8 — reads only: issue_read get #33786, get_comments #33786 (x2), get #33694, get #33808; pull_request_read get #34018, get_comments #34018 (x2)",
"api_writes": "6 REST writes through the fleet-write relay: POST /pulls (pr_create #34018) + POST /issues/34018/assignees; POST /issues/33786/comments (report 6897591859); PATCH /issues/34018 body x2 (round 2 S1/S2/N2, then N6/#34057, both on the seat's order, trailer-signed); POST /issues/33786/comments (this restamped report). git push is not REST.",
"files_changed": [
".changeset/33786-in-product-ai-performed-by.md",
"content/docs/references/data/data-engine.mdx (regenerated)",
"content/docs/references/data/hook.mdx (regenerated)",
"content/docs/references/kernel/execution-context.mdx (regenerated)",
"packages/spec/src/kernel/execution-context.zod.ts",
"packages/spec/src/kernel/execution-context.test.ts",
"packages/spec/src/data/hook.zod.ts",
"packages/spec/src/data/hook.test.ts",
"packages/objectql/src/engine-execution-plumbing.ts",
"packages/objectql/src/engine.test.ts",
"packages/runtime/src/sandbox/body-runner.ts",
"packages/runtime/src/sandbox/script-runner.ts",
"packages/cli/test/lowered-body-face-enumeration.test.ts (forced test edit)"
],
"line_budget": "n/a — no skills/** or governed path touched; +294/-49 over 13 files",
"deviations": [
"File surface wider than the claim: objectql engine-execution-plumbing.ts (+test), runtime sandbox body-runner.ts/script-runner.ts, cli face test. Needed so the new HookContext keys are populated (buildProvenance's own ADR-0049 note) and the body face stays complete (cli pin). Seat to amend the claim's File surface.",
"Two gates first exited 3 on prerequisites and were rerun green (see gates); the --ran file records the rerun codes.",
"cli: only the changed test file ran locally (unit); the rest of the cli unit layer is left to CI."
],
"open_questions": [
{
"question": "Shape: optional siblings or a union?",
"options": [
"A optional siblings + requiredOneOf(clientId, agentId) (shipped)",
"B discriminated union { clientId } | { agentId, conversationId?, confirmationId? }"
],
"recommendation": "A, because B makes every performedBy?.clientId reader a TS error on the other arm and adds a discriminant, i.e. new vocabulary; A keeps readers compiling and the published schema states the rule exactly. Cost of A: clientId is string | undefined in the type."
},
{
"question": "Key names (seat's call)",
"options": [
"A agentId / conversationId / confirmationId (shipped; ToolExecutionContext vocabulary + the card's wording)",
"B agentName / conversationId / pendingId (ActionConfirmationPending key)"
],
"recommendation": "A, because agentId and conversationId are the values the in-product path already holds by those names, and the id names a decided confirmation, not a pending one."
},
{
"question": "Hook-side names",
"options": [
"A flattened performedByAgentId / performedByConversationId / performedByConfirmationId (shipped)",
"B nested provenance.performedBy object"
],
"recommendation": "A, the existing performedByClientId flattening."
},
{
"question": "Metadata-protocol reading",
"options": [
"A none (shipped; server-built envelopes, no authorable-surface shard moved, level gate green at patch)",
"B added, following the #31740 HookContext.session.principalKind precedent (spec minor)"
],
"recommendation": "A, unless the seat holds hook-readable members to be protocol; then flip the line and the spec level together."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #34057 · ADR-0090 D10 rule 4 / ADR-0151 'Leaves unchanged' / 2026-09-20 one-key note amendment for the in-product AI producer (filed by the seat).",
"carrier: #33694 · keep the in-product agent id out of the OAuth-client performed_by namespace (ADR-0151 D5 reason 2); confirmationId names one of two stores, chosen by the performer key beside it (N2); reword the revision-bound 'does not record them yet' / 'at this revision' sentences and regenerate (N4, N5); test the resolve-before-stamp duty at the producer."
]
}
Activity
objectstack-fleet commentedon Nov 15, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch →
domain:spec· p2 · 2026-11-15T11:49Z⛔ Not a claim.
The spec half of #33694 (cloud#3826 phase 2, owner-ruled): a server-constructed in-product AI path may set
ExecutionContext.performedBy/HookContext.provenance, with the ADR-0090 D10 rule-4 reading amended. p2, like #33694.objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC
Claim: PM loop round 1 · 2026-11-15T14:22Z
Session:
session_01ADHkmQjrEpxMVxEiDUJHqC(seat); a card thread of this account's project is the dev and reports its session idAccount:
os-steveBranch: pending — the card thread's designated branch; a follow-up
Claim:from this session names it before the dev buildsWorktree:
objectstack-issue-33786Domain:
domain:specSeat:
domain:spec#2File surface:
packages/spec/src/kernel/execution-context.zod.ts(performedBy),packages/spec/src/data/hook.zod.ts(HookContext.provenance), their tests, regenerated spec references, root.changeset/. ⛔ Notdocs/adr/**(the ADR-0090 D10 rule 4 note is a skills-lane carrier) and notpackages/plugins/plugin-audit/**(#33694 keeps the writer half)Container & model:
M,mode:thread,model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue),effort: highClause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6893867283
Premise: holds at
origin/main895783a:execution-context.zod.tsperformedBycarries onlyclientIdand its.describesays "Set only at the /mcp OAuth door";hook.zod.tsprovenancecarries onlyperformedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record indocs/adr/0011-actions-as-ai-tools.md~:239. Item b is read as governed by that ruling; the dev stops withneeds_decisionif a ruling of record refuses it. Order:/mnt/project-files/spec-seat2/33786-delta.md(project share).Serial constraints cleared: #33694 waits on this card (
Blocked-by: #33786); no open PR orpm:dispatchedclaim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC
Claim: PM loop round 1 · 2026-11-15T14:24Z (names the branch; supersedes claim 6896002823, same session)
Session:
session_01ADHkmQjrEpxMVxEiDUJHqC(seat); card threadsession_01ADHkmRAvNc1qLS722dnoqnis the devAccount:
os-steveBranch:
claude/project-thread-hictiz(the card thread's designated branch; the platform lets a thread push only that branch, so notclaude/issue-33786-*)Worktree:
objectstack-issue-33786Domain:
domain:specSeat:
domain:spec#2File surface:
packages/spec/src/kernel/execution-context.zod.ts(performedBy),packages/spec/src/data/hook.zod.ts(HookContext.provenance), their tests, regenerated spec references, root.changeset/. ⛔ Notdocs/adr/**(the ADR-0090 D10 rule 4 note is a skills-lane carrier) and notpackages/plugins/plugin-audit/**(#33694 keeps the writer half)Container & model:
M,mode:thread,model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue),effort: highClause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6896002823
Premise: holds at
origin/main895783a:execution-context.zod.tsperformedBycarries onlyclientIdand its.describesays "Set only at the /mcp OAuth door";hook.zod.tsprovenancecarries onlyperformedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record indocs/adr/0011-actions-as-ai-tools.md~:239. Item b is read as governed by that ruling; the dev stops withneeds_decisionif a ruling of record refuses it. Order:/mnt/project-files/spec-seat2/33786-delta.md(project share).Serial constraints cleared: #33694 waits on this card (
Blocked-by: #33786); no open PR orpm:dispatchedclaim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmRAvNc1qLS722dnoqn
os-dev-report
{ "issue": 33786, "status": "done", "branch": "claude/project-thread-hictiz", "pr": "https://github.com/objectstack-ai/objectstack/pull/34018", "head": "93b0b119", "session": "session_01ADHkmRAvNc1qLS722dnoqn", "premise_still_valid": true, "summary": "ExecutionContext.performedBy gains optional agentId, conversationId and confirmationId beside clientId, which becomes optional; a requiredOneOf(['clientId','agentId']) refinement keeps a performer-less performedBy refused and projects into the published JSON Schema. HookContext.provenance mirrors them as performedByAgentId / performedByConversationId / performedByConfirmationId; objectql buildProvenance copies them and the sandbox body face carries them, so the declared keys are live (on main ObjectQL#createContext's parse dropped an agentId). jsdoc and .describe name both producers (the /mcp OAuth door, the server-constructed in-product AI path running as the person) and cite the cloud#3826 ruling chain in jsdoc only. No stop: ADR-0151 D5 refuses performedBy for an account that is its own subject, not for an AI acting as the person; no [ruled] note refuses this case.", "tests": "At ca6e40c9 under os-verify-lock (turbo test --only): spec 842 files/26965 passed (1 todo); objectql 596/13174; core 147/3402; mcp 65/1185; rest 412/8442 (332 skipped); plugin-audit 94/1541; runtime 605/10958 (19 skipped); plugin-auth 277/5485 (10 skipped); cli unit test/lowered-body-face-enumeration.test.ts 4/4. Typecheck of those 9 packages exit 0. After merging main 0ac112fc (head 93b0b119): check:generated 14/14 up to date, closure build 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal.integration 1/1, objectql+runtime typecheck exit 0. Ablations via ablation-replace.mjs (restored, blob == HEAD, git diff HEAD empty): (1) objectql drops the agentId copy -> engine pin red; (2) refine -> () => true -> 'REJECTS a performedBy naming no performer' red 1/46; (3) body-runner drops performedByAgentId -> cli face 3 failed/4. Type reverse check in objectql against the rebuilt spec dist: TS2353 on probeBogusKey only; valid keys and a performedBy?.agentId reader compile.", "gates": "dispatch-gates --commands at 93b0b119: 118 families, all run; 116 exit 0 first time; check-plugin-teardown-shape --self-test exit 3 (fixture not fetched) -> exit 0 after git fetch --depth=1 of 621a4876; check:dual-build-cjs-loads exit 3 (no dist for studio, embedder-openai, knowledge-ragflow, scenarios) -> exit 0 after building them. --ran: 118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN. check-changeset-no-major --event (PR body) exit 0: Clause-② yes, Metadata-protocol none, patch. PR check-runs: in_progress at report time.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "6 — reads only: issue_read get #33786, get_comments #33786 (x2), get #33694, get #33808; pull_request_read get #34018", "api_writes": "3 REST writes through the fleet-write relay: POST /pulls (pr_create #34018), POST /issues/34018/assignees (os-steve, same action), POST /issues/33786/comments (this report). git push is not REST.", "files_changed": [ ".changeset/33786-in-product-ai-performed-by.md", "content/docs/references/data/data-engine.mdx (regenerated)", "content/docs/references/data/hook.mdx (regenerated)", "content/docs/references/kernel/execution-context.mdx (regenerated)", "packages/spec/src/kernel/execution-context.zod.ts", "packages/spec/src/kernel/execution-context.test.ts", "packages/spec/src/data/hook.zod.ts", "packages/spec/src/data/hook.test.ts", "packages/objectql/src/engine-execution-plumbing.ts", "packages/objectql/src/engine.test.ts", "packages/runtime/src/sandbox/body-runner.ts", "packages/runtime/src/sandbox/script-runner.ts", "packages/cli/test/lowered-body-face-enumeration.test.ts (forced test edit)" ], "line_budget": "n/a — no skills/** or governed path touched; +294/-49 over 13 files", "deviations": [ "File surface wider than the claim: objectql engine-execution-plumbing.ts (+test), runtime sandbox body-runner.ts/script-runner.ts, cli face test. Needed so the new HookContext keys are populated (buildProvenance's own ADR-0049 note) and the body face stays complete (cli pin). Seat to amend the claim's File surface.", "Two gates first exited 3 on prerequisites and were rerun green (see gates); the --ran file records the rerun codes.", "cli: only the changed test file ran locally (unit); the rest of the cli unit layer is left to CI." ], "open_questions": [ { "question": "Shape: optional siblings or a union?", "options": ["A optional siblings + requiredOneOf(clientId, agentId) (shipped)", "B discriminated union { clientId } | { agentId, conversationId?, confirmationId? }"], "recommendation": "A, because B makes every performedBy?.clientId reader a TS error on the other arm and adds a discriminant, i.e. new vocabulary; A keeps readers compiling and the published schema states the rule exactly. Cost of A: clientId is string | undefined in the type." }, { "question": "Key names (seat's call)", "options": ["A agentId / conversationId / confirmationId (shipped; ToolExecutionContext vocabulary + the card's wording)", "B agentName / conversationId / pendingId (ActionConfirmationPending key)"], "recommendation": "A, because agentId and conversationId are the values the in-product path already holds by those names, and the id names a decided confirmation, not a pending one." }, { "question": "Hook-side names", "options": ["A flattened performedByAgentId / performedByConversationId / performedByConfirmationId (shipped)", "B nested provenance.performedBy object"], "recommendation": "A, the existing performedByClientId flattening." }, { "question": "Metadata-protocol reading", "options": ["A none (shipped; server-built envelopes, no authorable-surface shard moved, level gate green at patch)", "B added, following the #31740 HookContext.session.principalKind precedent (spec minor)"], "recommendation": "A, unless the seat holds hook-readable members to be protocol; then flip the line and the spec level together." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: domain:skills lane · ADR-0090 D10 rule 4 amendment note: the owner's ruling on cloud#3826 adds the server-constructed in-product AI path (principalKind human, running as the person) as a second performedBy producer; cite PR #34018's merge commit. Noted, not filed.", "carrier: #33694 · the writer half should keep the in-product agent id apart from OAuth client ids in sys_audit_log.metadata (ADR-0151 D5 reason 2 refuses two id namespaces in one performed_by key), and record conversationId/confirmationId. Noted, not filed." ] }Stamped 2026-11-15T16:24Z.
objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC
Claim: PM loop round 2 · 2026-11-15T16:25Z (widens the file surface to what PR #34018 measured necessary to populate the new hook keys; supersedes the previous claim, same session and branch)
Session:
session_01ADHkmQjrEpxMVxEiDUJHqC(seat); card threadsession_01ADHkmRAvNc1qLS722dnoqnis the devAccount:
os-steveBranch:
claude/project-thread-hictiz(the card thread's designated branch; the platform lets a thread push only that branch, so notclaude/issue-33786-*)Worktree:
objectstack-issue-33786Domain:
domain:specSeat:
domain:spec#2File surface:
packages/spec/src/kernel/execution-context.zod.ts(performedBy),packages/spec/src/data/hook.zod.ts(HookContext.provenance), their tests, regenerated spec references; the copy ofExecutionContext.performedByinto hook provenance only:packages/objectql/src/engine-execution-plumbing.ts(buildProvenance),packages/runtime/src/sandbox/body-runner.ts,packages/runtime/src/sandbox/script-runner.ts, their tests, and the forced pin edit inpackages/cli/test/lowered-body-face-enumeration.test.ts; root.changeset/. ⛔ Notdocs/adr/**(the ADR-0090 D10 rule 4 note is a skills-lane carrier) and notpackages/plugins/plugin-audit/**(#33694 keeps the writer half)Container & model:
M,mode:thread,model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② widening, so the seat owes a CONTRACT_REVIEW_TIER review before the queue),effort: highClause-②: yes
Metadata-protocol: none (expected: server-constructed context, no authorable key; the PR declares the final reading)
Responsibility: n/a — contract half of #33694 (cloud#3826 phase 2, owner-ruled)
Thread-read: 6897591859
Premise: holds at
origin/main895783a:execution-context.zod.tsperformedBycarries onlyclientIdand its.describesays "Set only at the /mcp OAuth door";hook.zod.tsprovenancecarries onlyperformedByClientId. Ruling-ref: #33694 body, 「3826 照建议(征询版)」 (account owner, cloud#3826, decision request 6890278459); same chain of record indocs/adr/0011-actions-as-ai-tools.md~:239. Item b is read as governed by that ruling; the dev stops withneeds_decisionif a ruling of record refuses it. Order:/mnt/project-files/spec-seat2/33786-delta.md(project share).Serial constraints cleared: #33694 waits on this card (
Blocked-by: #33786); no open PR orpm:dispatchedclaim touches the two files (seat 1's #33757automation-service.ts, seat 4's #33698 DriverCapabilities, this seat's #33634 i18n files).objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmRAvNc1qLS722dnoqn
os-dev-report
Restamp for head 75dcf73. This supersedes report 6897591859.
{ "issue": 33786, "status": "done", "branch": "claude/project-thread-hictiz", "pr": "https://github.com/objectstack-ai/objectstack/pull/34018", "head": "75dcf734", "session": "session_01ADHkmRAvNc1qLS722dnoqn", "premise_still_valid": true, "summary": "ExecutionContext.performedBy gains optional agentId, conversationId and confirmationId beside clientId, which becomes optional; a requiredOneOf(['clientId','agentId']) refinement keeps a performer-less performedBy refused and projects into the published JSON Schema. HookContext.provenance mirrors them as performedByAgentId / performedByConversationId / performedByConfirmationId; objectql buildProvenance copies them and the sandbox body face carries them, so the declared keys are live (on main ObjectQL#createContext's parse dropped an agentId). jsdoc and .describe name both producers (the /mcp OAuth door, the server-constructed in-product AI path running as the person) and cite the cloud#3826 ruling chain in jsdoc only. No stop: ADR-0151 D5 refuses performedBy for an account that is its own subject, not for an AI acting as the person; no [ruled] note refuses this case. Round 2 (contract review 6897691839, S1/S2) reworded only the prose: the in-product producer stamps a request-named id only after the server resolved it for the person in userId, and the descriptions no longer say the audit writer records the new keys. Round-2 review 6898426121 PASS on ceeec029. 75dcf734 is a merge-only commit (main 529ed7d9) under the seat's K >= 15 rule; all 13 PR files are byte-identical to ceeec029.", "tests": "At ca6e40c9 under os-verify-lock (turbo test --only): spec 842 files/26965 passed (1 todo); objectql 596/13174; core 147/3402; mcp 65/1185; rest 412/8442 (332 skipped); plugin-audit 94/1541; runtime 605/10958 (19 skipped); plugin-auth 277/5485 (10 skipped); cli unit test/lowered-body-face-enumeration.test.ts 4/4. Typecheck of those 9 packages exit 0. After merging main 0ac112fc (head 93b0b119): check:generated 14/14 up to date, closure build 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal.integration 1/1, objectql+runtime typecheck exit 0. Ablations via ablation-replace.mjs (restored, blob == HEAD, git diff HEAD empty): (1) objectql drops the agentId copy -> engine pin red; (2) refine -> () => true -> 'REJECTS a performedBy naming no performer' red 1/46; (3) body-runner drops performedByAgentId -> cli face 3 failed/4. Type reverse check in objectql against the rebuilt spec dist: TS2353 on probeBogusKey only; valid keys and a performedBy?.agentId reader compile. Round 2: spec pins 146/146 on bfaef935; on ceeec029 (main b4ce310b merged) the closure build was 113/113, spec pins 146/146, objectql engine.test.ts 138/138, cli face 4/4, runtime hook-provenance-signal 1/1, objectql and runtime typecheck exit 0; on 75dcf734 the spec build and check:generated were 14/14 up to date and the spec pins 146/146.", "gates": "Round 1 at 93b0b119: 118/118 run, 0 NOT-MEASURED (two first exited 3 on prerequisites and were rerun green). On ceeec029: dispatch-gates --commands 118 families, all exit 0 on the first run; --ran 118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN. On 75dcf734 (merge-only, PR files byte-identical): no local re-derivation; CI is in progress on this head. CI on ceeec029: 58 success / 10 skipped / 0 failed (per review 6898426121).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "8 — reads only: issue_read get #33786, get_comments #33786 (x2), get #33694, get #33808; pull_request_read get #34018, get_comments #34018 (x2)", "api_writes": "6 REST writes through the fleet-write relay: POST /pulls (pr_create #34018) + POST /issues/34018/assignees; POST /issues/33786/comments (report 6897591859); PATCH /issues/34018 body x2 (round 2 S1/S2/N2, then N6/#34057, both on the seat's order, trailer-signed); POST /issues/33786/comments (this restamped report). git push is not REST.", "files_changed": [ ".changeset/33786-in-product-ai-performed-by.md", "content/docs/references/data/data-engine.mdx (regenerated)", "content/docs/references/data/hook.mdx (regenerated)", "content/docs/references/kernel/execution-context.mdx (regenerated)", "packages/spec/src/kernel/execution-context.zod.ts", "packages/spec/src/kernel/execution-context.test.ts", "packages/spec/src/data/hook.zod.ts", "packages/spec/src/data/hook.test.ts", "packages/objectql/src/engine-execution-plumbing.ts", "packages/objectql/src/engine.test.ts", "packages/runtime/src/sandbox/body-runner.ts", "packages/runtime/src/sandbox/script-runner.ts", "packages/cli/test/lowered-body-face-enumeration.test.ts (forced test edit)" ], "line_budget": "n/a — no skills/** or governed path touched; +294/-49 over 13 files", "deviations": [ "File surface wider than the claim: objectql engine-execution-plumbing.ts (+test), runtime sandbox body-runner.ts/script-runner.ts, cli face test. Needed so the new HookContext keys are populated (buildProvenance's own ADR-0049 note) and the body face stays complete (cli pin). Seat to amend the claim's File surface.", "Two gates first exited 3 on prerequisites and were rerun green (see gates); the --ran file records the rerun codes.", "cli: only the changed test file ran locally (unit); the rest of the cli unit layer is left to CI." ], "open_questions": [ { "question": "Shape: optional siblings or a union?", "options": [ "A optional siblings + requiredOneOf(clientId, agentId) (shipped)", "B discriminated union { clientId } | { agentId, conversationId?, confirmationId? }" ], "recommendation": "A, because B makes every performedBy?.clientId reader a TS error on the other arm and adds a discriminant, i.e. new vocabulary; A keeps readers compiling and the published schema states the rule exactly. Cost of A: clientId is string | undefined in the type." }, { "question": "Key names (seat's call)", "options": [ "A agentId / conversationId / confirmationId (shipped; ToolExecutionContext vocabulary + the card's wording)", "B agentName / conversationId / pendingId (ActionConfirmationPending key)" ], "recommendation": "A, because agentId and conversationId are the values the in-product path already holds by those names, and the id names a decided confirmation, not a pending one." }, { "question": "Hook-side names", "options": [ "A flattened performedByAgentId / performedByConversationId / performedByConfirmationId (shipped)", "B nested provenance.performedBy object" ], "recommendation": "A, the existing performedByClientId flattening." }, { "question": "Metadata-protocol reading", "options": [ "A none (shipped; server-built envelopes, no authorable-surface shard moved, level gate green at patch)", "B added, following the #31740 HookContext.session.principalKind precedent (spec minor)" ], "recommendation": "A, unless the seat holds hook-readable members to be protocol; then flip the line and the spec level together." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: #34057 · ADR-0090 D10 rule 4 / ADR-0151 'Leaves unchanged' / 2026-09-20 one-key note amendment for the in-product AI producer (filed by the seat).", "carrier: #33694 · keep the in-product agent id out of the OAuth-client performed_by namespace (ADR-0151 D5 reason 2); confirmationId names one of two stores, chosen by the performer key beside it (N2); reword the revision-bound 'does not record them yet' / 'at this revision' sentences and regenerate (N4, N5); test the resolve-before-stamp duty at the producer." ] }Stamped 2026-11-15T17:41Z.
objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC
Landed · #33786 via PR #34018 · 2026-11-15T23:22Z
2539ad9860a3e43323fcf35ac80ffee47c8dec3eat 2026-11-15T23:21ZFixes #33786State:
pm:dispatchedremoved and assignee cleared; the card is done. Dependents told it merged: #34057.feat(spec, objectql, runtime): the in-product AI path can name itself…