Skip to content

fix(config): treat sessions as a member setting so a workspace sees the machine value - #1483

Merged
SaulMoro merged 1 commit into
Tencent:mainfrom
hz89Dev:fix/sessions-member-setting
Oct 27, 2026
Merged

SaulMoro merged 1 commit into
Tencent:mainfrom
hz89Dev:fix/sessions-member-setting

Conversation

@hz89Dev

@hz89Dev hz89Dev commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Fixes red CI on main (Lint & Test, every OS and Node version).

#1478 added sessions to LocalConfigSchema. #1473 added a test that every local config key is either install metadata (LOCAL_CONFIG_INSTALL_KEYS) or a member setting (MemberSettingsSchema). Each PR was green on its own. Together the test fails:

FAIL src/__tests__/types.test.ts > LocalConfigSchema key ownership > keeps install and member settings declarations exhaustive and disjoint
-   "sessions",

The same gap is a user-visible bug: a workspace scope ignores sessions in the machine config (~/.teamai/config.yaml).

 MemberSettingsSchema = z.object({
   ...
   modelAliases: ...,
+  sessions: z.unknown().optional(),
   workflows: ...,
 })

sessions is a member setting, not install metadata: the schema describes it as "this member's sessions", and the init --force e2e from #1478 already keeps it as one. It stays z.unknown() so SessionPolicy.readPublish keeps reporting a value it cannot use. Like the other member settings except workflows and modelAliases, a workspace's own sessions replaces the machine value as a whole.

Testing

  • npx tsc --noEmit, npm run lint: clean
  • npx vitest run: 604 files passed, 1 skipped (17748 tests)
  • Real CLI, after npm run build. I ran init --scope workspace against a local bare team repo, wrote sessions: 5 to a settings-only machine ~/.teamai/config.yaml, then ran teamai doctor in the workspace:
    • main: no sessions note. The machine value never reaches the workspace.
    • This branch: config.yaml sessions is 5, not a mapping such as publish: { unattended: off }, so it is ignored.

I did not run other providers or agents locally. They are left to CI.

…he machine value

Tencent#1478 added sessions to the local config and Tencent#1473 required every local
config key to be either install metadata or a member setting. Each landed
green on its own; together the key ownership test fails on main, and a
workspace scope ignores the sessions setting in the machine config.

sessions describes this member's own sessions, and init --force already
keeps it as a member setting, so it joins MemberSettingsSchema.
@github-actions

Copy link
Copy Markdown

No findings in the scoped diff.

The PR description satisfies the testing requirement: it records a build followed by a representative real-CLI run demonstrating the changed behavior. Additional provider and agent coverage is explicitly deferred to CI.

Review limited to the diff; no PR code was run, built, or installed.

@SaulMoro SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was generated by AI during triage.

Approving at 195644e. sessions is a member setting: the schema calls it "this member's sessions" and the init --force path from #1478 already keeps it, so this restores the key-ownership invariant from #1473 and lets a workspace read the machine value. CI is green at the head, the CI review has no findings, and the doctor run in the body shows the value now reaching the workspace. Thanks for the quick fix.

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.

3 participants