# One integration, three responsibility levels / 一次集成，三种职责要求

## English

### What this example contributes

The guided integration adds a read-only order cache to the existing fictional after-sales Agent. Its actual tool call crosses the merchant's local HTTP boundary, uses current authenticated authority and stores eligible results in local SQLite. The deterministic teaching model remains in use. A persisted cache hit, a rejected revoked session and a merchant receipt show different boundaries. They do not establish a learner's authorship, real-model behavior or production experience.

Read the [integration walkthrough](https://ai.lwkjob.com/lab/project-integration/README.md), [independent changed requirement](https://ai.lwkjob.com/lab/project-integration/LEARNER_TASK.md) and [authored assessment examples](https://ai.lwkjob.com/lab/project-integration/ASSESSMENT_EXAMPLES.json). The [career paths](https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md) and [blank reviewer worksheet](https://ai.lwkjob.com/lab/capstone/ASSESSMENT_TEMPLATE.json) remain the full responsibility contracts. This example contributes evidence to those paths; it does not complete the intermediate or senior path.

### Junior delivery: explain and implement a bounded boundary

Prepare a source copy with the original baseline intact. Identify the order-read call site, the merchant authority check and the cache store separately. Before looking at the guided patch, write why a row remaining in SQLite cannot grant access after revocation. Implement one personally chosen bounded read/input guard in a separate project copy; submit a legal positive case and a rejected negative case. The supplied guided implementation is a worked example, not that personal submission.

Deliver a before/after source diff, source digests, the failed-before report, the successful same-input rerun and one task trace. Annotate model request → actual tool → merchant authorization → cache decision → returned value → final task result. Diagnose one fixed fault before viewing its repair. Explain where the cache hit avoids an order fetch, where authority is still refreshed and why approval/execution remain outside read caching. A reviewer supplies a complete fresh input and observes the personal correction.

Useful local evidence is a precise call-site change and discriminating rejection. Missing personal code or observed correction stays pending even when all guided checks pass. The complete junior path also requires its prerequisite work, career contract, source-claim review and project explanation.

### Intermediate delivery: independently change a requirement and preserve the project

Implement the unimplemented requirement in LEARNER_TASK.md in your own copy. Keep the baseline files and expected labels unchanged. Preserve the original source digest, the required red baseline, your diff, passed-after evidence and a restart record that proves a stored row was actually read. Record every changed fixture and which owner may supply its values. A file named passed.json, a new helper never invoked by Agent.tool or a changed expected result is not integration evidence.

Deliver a short release package: changed input/output contract; actual HTTP and persisted-state records; original task regression; task-level denominators and failed slices; source-supported answer review; rollback sequence; and an incident note with trigger, first rejected boundary, fix and rerun. Reconcile the original unknown write using its original operation key and an independent merchant audit. A read cache cannot turn an unknown write into a safe cached success.

Explain the business tradeoff: a strict current authorization request on every access limits what the cache can save. Do not claim model cost, latency improvement or production throughput from a cache hit count. Measure any claimed timing under declared conditions. The complete intermediate path still requires the hygiene change, two separate practice modules, career scheduling/budget contract and reviewer-observed fresh requirement.

### Senior delivery: own constraints, migration and a failure window

Use the integrated cache as one bounded security/authorization specialty counterexample. Name the owners of authenticated identity, authority versions, order versions, cache schema, expiry decisions, Agent continuation, approval and merchant receipts. Draw two tenants through these boundaries and explain which fields are trusted server values. Trace revocation between a cache lookup and a later action; current permission must be checked at the action boundary as well.

Deliver two ADRs. The first compares no cache, per-request verified cache and another explicitly constrained alternative; include reversal conditions and a failure window. The second covers a cache schema/version migration, old/new worker compatibility, invalidation and rollback. Retain a runnable counterexample and before/after state. Include a kill switch, queue/admission assumptions, monitoring signals tied to business success, an incident stop/reconcile/resume sequence and a component handoff/review plan.

This small local integration does not implement a shared production budget, distributed lease fencing or a load experiment. Complete the senior capacity/isolation/fencing code and other career artifacts separately. Declared fictional capacity arithmetic is design work; a measured load result needs the actual source, inputs, processes, timings and limits. Observed reasoning, real operational responsibility and collaboration remain pending until independently reviewed.

Use the [graduation scoring guide](https://ai.lwkjob.com/lab/capstone/ASSESSMENT_GUIDE.md) and worksheet v2: six/twelve/eighteen cumulative artifacts include lower-level evidence. This partial worked example leaves those observations pending. A fresh observation targets the selected level.

### How to use the scores

The five dimensions, in order, are coding/integration, debugging/reliability, evaluation/RAG, architecture/boundaries and communication/evidence. Teaching weights are junior 35/25/15/15/10, intermediate 25/25/20/20/10 and senior 15/20/20/30/15. Suggested completion requires at least 80/100, at least 60% of each dimension, every level-specific artifact and no critical gate failure. Do not round fractional dimension minima down. These are uncalibrated teaching suggestions, not an employer's official standard; scores across levels are not interchangeable.

ASSESSMENT_EXAMPLES.json separates executed author-reference artifacts from illustrative scoring judgments. Its three examples show what an artifact can support, what remains missing and how to revise a submission. They are not real learner records or passed ranks. In a learner's ASSESSMENT_TEMPLATE.json, keep unobserved scores, personal changes, fresh conditions, real-provider integration and production responsibility pending. A reviewer records observations and source digests before making a decision.

Critical gates remain current identity/authority, a single effect under the original business key and truthful provenance. Missing required evidence cannot be offset by a high local score. A deterministic model is local engineering evidence only; HTTP 429, a stub or this guided run does not pass a real-provider gate.

## 中文

### 这个示范能贡献什么

引导集成把订单只读缓存接入现有虚构售后 Agent。实际工具调用穿过商家的本机 HTTP 边界，使用当前认证权限，将可复用结果保存在本机 SQLite；模型仍是确定性教学生成器。持久化命中、撤权后拒绝、商家回执分别证明不同边界，不能据此认定学员本人实现、真实模型表现或生产经验。

阅读[集成流程](https://ai.lwkjob.com/lab/project-integration/README.md)、[独立变化需求](https://ai.lwkjob.com/lab/project-integration/LEARNER_TASK.md)和[作者编制评分示例](https://ai.lwkjob.com/lab/project-integration/ASSESSMENT_EXAMPLES.json)。[职责路径](https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md)与[空白评审记录](https://ai.lwkjob.com/lab/capstone/ASSESSMENT_TEMPLATE.json)仍是完整职责合同。本示范只贡献其中一部分证据，不会完成整个中级或资深路径。

### 初级交付：解释并实现一个有边界的检查

准备保留原基线的源码副本，分别指出订单读取调用点、商家权限检查、缓存存储。看引导补丁之前，写清 SQLite 里还留着一行为何不能在撤权后授予访问。另在本人项目副本实现一项自己选择的只读或输入守卫，提交合法正例与拒绝反例；引导实现是讲解示范，不能算本人提交。

交修改前后 diff、源码摘要、修改前失败、同输入修后通过和一条任务轨迹。标注模型请求→实际工具→商家鉴权→缓存决定→返回内容→最终任务结果；在看修复前诊断一项固定故障。解释命中省去了哪次订单读取、哪些权限查询仍存在，以及为何审批和执行不进入只读缓存。评审另给完整新输入，观察本人修正。

有价值的本机证据是明确的调用点变更与能区分错误的拒绝。本人代码或观察到的新条件修正缺失，即使引导检查全绿也保持 pending。完整初级路径还要求先备作业、career 合同、原文主张复核和项目讲解。

### 中级交付：独立变需求并守住原项目

在本人副本实现 LEARNER_TASK.md 的未实现需求，不改基线文件和预期标签。保留原源码摘要、规定的红基线、本人 diff、修后证据和实际读到持久行的重启记录；记录每个变动夹具及其值由谁提供。名为 passed.json 的文件、Agent.tool 从未调用的新 helper，或改掉预期结果，都不算集成证据。

交简短发布包：变化前后输入输出合同、实际 HTTP 和持久状态记录、原任务回归、任务分母与失败切片、原文支持的回答复核、回滚顺序，以及触发→首个拒绝边界→修复→重跑的事故记录。未知写继续使用原操作键与独立商家审计对账；只读缓存不能把未知写变成可安全缓存的成功。

说明业务取舍：每次访问都严格刷新当前权限，限制了缓存可节约的范围。命中次数不能直接证明模型成本、延迟改善或生产吞吐；主张耗时必须在明确条件下实测。完整中级路径仍需卫生用品变化、两类独立实训、career 调度预算合同及评审观察新需求。

### 资深交付：负责约束、迁移和失败窗口

把本次集成作为安全授权方向的一项有界反例。标明认证身份、权限版本、订单版本、缓存 schema、失效决定、Agent 续轮、审批和商家回执的负责人。沿两租户追踪这些边界，说明哪些值来自可信服务端；追踪缓存读取与后续动作之间发生撤权的窗口，动作边界仍须检查当前权限。

提交两份 ADR。第一份比较不缓存、每次刷新权限的缓存及另一项有明确约束的方案，写出反转条件与失败窗口；第二份覆盖缓存 schema/版本迁移、新旧 worker 兼容、失效和回滚。保留可运行反例及前后状态；补 kill switch、队列准入假设、关联业务成功的监控、事故止血/对账/恢复顺序和组件交接评审计划。

这个本机小集成未实现生产共享预算、分布式 lease fencing 或压测。career 的容量隔离 fencing 编码和其他资深产物仍须独立完成。明确虚构输入的容量计算是设计作业；实测负载须有实际源码、输入、进程、耗时和边界。观察到的推理、真实运维责任及协作，独立复核前仍保持 pending。

使用[毕业评分指南](https://ai.lwkjob.com/lab/capstone/ASSESSMENT_GUIDE.md)和v2记录表：6/12/18项累计产物包含低级别证据；本次局部作者示例内这些观察仍为pending，新条件须针对所选级别。

### 如何使用分数

五维依次为编码集成、排错可靠性、评测 RAG、架构边界、表达证据。教学权重为初级 35/25/15/15/10、中级 25/25/20/20/10、资深 15/20/20/30/15。建议教学完成须总分至少 80/100、各维至少 60%、全部级别产物齐全且关键门无失败，小数底线不能向下取整。这是尚待试教校准的建议，不是企业官方标准，跨级分数不能换算。

ASSESSMENT_EXAMPLES.json 将已运行的作者参考产物与示范性评分判断分开。三份示例说明产物支撑什么、缺什么、怎样修订，不是真实学员记录或职级通过。学员自己的 ASSESSMENT_TEMPLATE.json 中，未观察分数、本人变化、新条件、真实提供方接入和生产责任都保持 pending；评审记录观察与源码摘要后再作判断。

关键门仍是当前身份权限、原业务键下唯一效果、真实来源。高局部分不能抵消必需证据缺失。确定性模型只提供本机工程证据，HTTP 429、桩或本次引导运行都不能通过真实提供方关卡。
