Repository navigation
docs(skills): objectstack-data eval case 3 answers the code-defined datasource credential route and pins it - #28485
Conversation
…atasource credential route and pins it Case 3 of hooks-security-seeds-datasources.json (a read-only object over a Postgres reporting table) answered `credentialsRef` for a datasource declared in code. rules/datasources.md teaches the environment route for that shape: the password is read at connect from OS_DATASOURCE_NAME_PASSWORD while the host switch OS_DATASOURCE_ENV_CREDENTIALS is on. The model answer now states that route, keeps columnMap and schemaMode, and must_contain pins the switch name and the _PASSWORD suffix so an old-route answer goes red. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzZbFMJNGn3NuRu8zt
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix Contract reviewServed-tier: Inputs read: card #28435 (body and all four comments, the dev report 6550536351 included), PR #28485 (body, file list, net diff against Diff: two files, +14/-2. ① Derived judgments
② Semver level
Clause-②: no — right. Nothing in the diff narrows a published capability or a spec refusal; the eval now teaches the route the spec's own ③ Boundary flags
④ Design judgment
Every sentence of the new model answer checks out against the cited code, read, not taken from the PR body:
Attempts to break it:
Must-fix: none. Should-fix: none. The Gates on the head at the time of this record: every non-skipped check-run is green (Check Changeset, Governed Surface Queue Guard, PR-body guards, all Lint and Type Check jobs, including Implemented-by: VERDICT: PASS |
|
domain:skills#1 · os-tesla · session_01L9qibzCtJt8Q2Z63fyRNix 维护者速读
席位意见:契约复审 PASS,无必修项,也无建议修改项。dev 问要不要把 席位核对ACCEPT · seat
|
Requested by Tesla · project thread
Fixes #28435
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-data技能的评测用例 3(把 Postgres 报表库的customers表暴露为只读legacy_customer对象)的标准答案,从「defineDatasource用credentialsRef」改成rules/datasources.md现在教的环境变量路线:连接时从OS_DATASOURCE_REPORTING_PASSWORD(数据源名大写)读密码,主机开关OS_DATASOURCE_ENV_CREDENTIALS为on;保留columnMap、schemaMode;must_contain新增OS_DATASOURCE_ENV_CREDENTIALS与_PASSWORD两个钉子。另加一条@objectstack/skills的 patch changeset。sys_secret:句柄,评测答案仍教credentialsRef就是教错;原must_contain不含任何凭据路线,评测对这个错一直是绿的。skills/objectstack-data/evals/hooks-security-seeds-datasources.json用例 3 的expected_output与must_contain(唯一的代码 hunk);.changeset/28435-data-eval-case3-env-credential-route.md。node scripts/check-skills-token-ratchet.mjs→ 该文件一行为1750 tokens — eval fixture, measured but not ratcheted,56 个受限文件全在上限内;对照skills/objectstack-data/rules/datasources.md的「Credentials — fail-closed」一节,答案里的变量名、开关名与默认值与之逐字一致。skills/**):PR 保持 draft,席位做契约复审与席位核对后交你批准,批准后由席位落地。What changes
One eval fixture and one changeset. Nothing else in the tree moves.
skills/objectstack-data/evals/hooks-security-seeds-datasources.json, case 3.expected_outputbefore: "AdefineDatasourceentry (credentialsRef, never inline credentials); the object setsdatasource: 'ID' (the datasource name, spelled with angle brackets in the old text),remoteNamefor the table,columnMapfor columns;schemaModeleaves the remote schema unaltered; the external write gate stays closed."expected_outputafter: adefineDatasourceentry (sayreporting) withschemaMode: 'external'and no credential in the declaration; the password is read at connect fromOS_DATASOURCE_REPORTING_PASSWORD(the name upper-cased) while the host switchOS_DATASOURCE_ENV_CREDENTIALSison(os serve/start/devdefault it on); the object setsdatasource: 'reporting'andexternal: { remoteName: 'customers', columnMap }; the write gate stays closed (noallowWrites, nowritable).must_containkeepsdefineDatasource,datasource,remoteName,columnMap,schemaModeand addsOS_DATASOURCE_ENV_CREDENTIALSand_PASSWORD, so an answer that teaches only thecredentialsRefroute goes red.must_not_contain(columnName:) is unchanged. The prompt is unchanged.Every sentence of the new answer is copied from what
mainteaches and does, not from the card's paraphrase:mainstates itOS_DATASOURCE_+ the name upper-cased +_PASSWORDrules/datasources.md"Credentials — fail-closed";packages/services/service-datasource/src/datasource-env-credential.tsdatasourceEnvCredentialVarOS_DATASOURCE_ENV_CREDENTIALSison;os serve/start/devdefault it onpackages/cli/src/utils/datasource-env-credentials-default.ts;packages/spec/src/data/driver/common.zod.tsCODE_DEFINED_CREDENTIAL_ROUTEschemaMode: 'external'for a mature external DB (DDL forbidden)schemaMode— who owns the schema"external: { remoteName, columnMap }on the object;datasourcenames the datasourceexternal.allowWritesand the object'sexternal.writablepackages/spec/src/data/datasource.zod.tsallowWrites.changeset/28435-data-eval-case3-env-credential-route.md—'@objectstack/skills': patch, both declaration lines, before/now.Skill bundle readings (
skills/**touched)origin/main82b29fe)skills/objectstack-data/evals/hooks-security-seeds-datasources.jsonSKILL.mdinskills/check-skills-token-ratchetbundle total (whole shipped tree)Eval fixtures are measured and not ratcheted (the gate's population 1b), so the +76 tokens pay no ceiling; no CEILINGS row moves and nothing was deleted to fund it.
Tests
must_containtoken of case 3 occurs in its ownexpected_output, andcolumnName:does not.must_containtoken is taught by the bundle as a whole token (the rule the objectui eval-token gate applies, checked by hand here because that gate's population isskills/objectuionly):OS_DATASOURCE_ENV_CREDENTIALS1 occurrence,_PASSWORD1 occurrence inskills/objectstack-data/**/*.md.node scripts/check-skills-token-ratchet.mjs: exit 0 — 56 authored bundle files within their ceilings; 10 generator-owned and 28 eval fixtures measured, not ratcheted.Acceptance notes
must_not_containwas not extended withcredentialsRef:rules/datasources.mdstill teachescredentialsRefas a declared channel that wins over the variable, so an answer that mentions it while following the environment route would be a correct answer refused. The triage route asked for amust_containpin, which is what landed. If the seat prefers the eval to refuse the old route outright, that is a one-token follow-up on the same fixture._PASSWORDplus the switch name rather than a whole variable name. An answer namingOS_DATASOURCE_REPORTING_PASSWORD,OS_DATASOURCE_WAREHOUSE_PASSWORDor any other derived name passes; an answer with no derived variable fails.skills/objectstack-data/evals/objects-fields-relationships.jsonwas not read for the same drift (the order excludes that file; another thread may edit it).Verification
All readings on head
09443b1e(the only commit of this branch;origin/mainmerge base82b29fe5).Derived gates: 40 derived, 39 run, 1 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 40 commands from the two changed paths. Each ran with stdin from/dev/null, its exit code landed on disk before any pipe (28435-gates-ran-09443b1e.listin the seat's orders folder):pnpm --filter '@objectstack/lint...' buildrun first forcheck:doc-formula-expressions.pnpm check:lean-entry-closure: exit 3 (PREREQUISITE NOT MET,packages/objectql/distabsent), then exit 0 afterpnpm turbo run build --filter=@objectstack/objectqlunder the verify lock (VERDICT command-exit 0, 2m48s): 2 published conditions measured from a real load, admitted set held exactly.pnpm check:dual-build-cjs-loads: exit 3, PREREQUISITE NOT MET — it reads every published package'sdist/and 89 are unbuilt in this worktree. NOT MEASURED locally. The diff touches no package it loads (an eval fixture and a changeset), and CI runs it in Lint & Repo Gates.Reconciliation:
dispatch-gates --ranprinted40 derived famil(ies) accounted for — 39 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3); changed lines 16 (+14 / −2) vs the human-merge threshold 3000: under.Outside the derivation, run as evidence:
node scripts/check-skills-token-ratchet.mjsexit 0 (readings in the table above); the objectui eval-token gatepnpm --dir ui run check:skill-eval-tokens --listexit 0 with 0 red rows (its population isskills/objectuionly, so the edited fixture is not in it).Writes:
git pushonce; the relaypr_create(draft, no assignees, no labels, no reviewers; the harness's MCP assignee and review-request step is skipped, since MCP writes are forbidden here); theos-dev-reportcomment throughpost-stamped.mjs. MCP GitHub calls: 0.Tier H by path (
skills/**). The PR stays a draft: the seat runs the contract review and the 席位核对, then hands it to the approver.Generated by Claude Code