Glean 拾遗
Daily · timeline

A few picks a day.

Thu, Sep 24, 2026 3picks
← 09-23
Calendar ▾
2026 · 09
MoTuWeThFrSaSu ·123456789101112131415161718192021222324252627282930
has picks today
06:00

Applying "Make Invalid States Unrepresentable" to Schema Design

让非法状态无法表示:两个数据库建模案例

Two production cases of the "make invalid states unrepresentable" principle applied to schema design. First: modelling a contiguous timeline as a List (Date, Date) admits gaps and overlaps; storing only the split dates as a Set Date makes contiguity and non-overlap structural, and adding a split becomes a single set insert. Second: a contract system that stored both fixed and default contracts in one table allowed contract gaps — an optional end date plus a "default" flag made them easy to create, the per-contract mutation API guarded nothing, and real gaps reached production, costing hours to trace. Removing default contracts from the table and inferring them when no fixed contract exists eliminates both the gaps and the optional end date. The author traces the original design to object-oriented thinking that reifies every concept as a row rather than a proposition, and closes with two ways to forbid overlapping contracts: a database excludes constraint, or allowing overlaps in the write model and flattening them in a read-model projection terminated by the next contract's start date.

kevinmahoney.co.uk · 6 min · Data Modeling · Database · Domain Modeling · Software Engineering
06:00

Consistency is Consistently Undervalued

被长期低估的一致性:拆服务之前先算清 ACID 的账

The author argues that when teams adopt microservices or non-ACID databases, the most underrated loss is the transaction. Using a single constraint — one user must have exactly one profile — he shows how a single-database transaction gives atomicity and isolation for free: both rows are created together or not at all, and no other process ever observes a half-written state. Split users and profiles into two services and all of that disappears. He walks through the failure paths one by one: a failed profile write leaves an orphan user; the compensating delete can itself fail, or the process can die mid-way; even with 100% reliable services, concurrent threads can see the user without the profile and create a duplicate; foreign keys no longer hold, so profiles can point at deleted or changed user IDs; periodic cleanup of dangling rows still leaves a window of inconsistency. Application-layer compensation, he concludes, amounts to rebuilding a half-working, buggy distributed ACID database.

kevinmahoney.co.uk · 5 min · Database · Distributed Systems · Microservices · Software Engineering
06:00

Claude Opus 5.5: 40% cheaper, best alignment scores

Claude Opus 5.5 发布:成本降四成,对齐审计得分居首

Anthropic released Claude Opus 5.5, the first model in its new Claude 5.5 family, claiming Fable 5.1-level performance at 40% lower serving cost than Opus 5. Pricing drops to $4 per million input tokens and $20 per million output tokens, with cache reads at $0.20 (60% lower), and output generation is more than 30% faster. Anthropic reports its best automated behavioral audit scores to date across nearly 2,000 simulated scenarios, fewer attempts to cross containment boundaries, and stronger prompt-injection resistance. Because biology and cybersecurity capabilities approach Fable 5.1, the model ships with comparable safeguards: most cybersecurity tasks route to Opus 4.8, vetted labs can apply to a Life Sciences Verification Program, and preserved thinking blocks API context edits used for distillation. Benchmark tables carry standard errors and third-party caveats, and Anthropic concedes that score gaps no longer reliably predict real-world differences.

www.anthropic.com · 23 min · Ai Safety · Anthropic · Claude · LLM · Model Comparison · Prompt Injection