Skip to content

[finding] scoped-context.ts:64 comment still describes the captureBefore/ctx.__previous stash retired by #6656 (packages/spec — hard single ownership) #7709

Closed

Description

@os-help

Split from #6978 item 2 (its item 1 landed via PR #7081; the remainder is cross-lane — packages/spec carries the hard single-owner rule, so this belongs to the spec seat regardless of who wants it). Filed unassigned as a recording — not a claim.

Symptom

packages/spec/src/contracts/scoped-context.ts:64 carries a comment describing the captureBefore / ctx.__previous stash mechanism. #6656 retired the property (A+ retirement, merged 2026-08-09) and PR #7081 deleted the last consumer limb, so the comment asserts a world that no longer exists. The declared pre-image channel is ctx.previous.

(Line number from the #6978 census of 2026-08-09; re-anchor by grepping captureBefore/__previous before editing.)

Fix shape

Comment-only rewrite in the contract file. ⚠️ Because it lives in packages/spec, only the spec seat should land it, and the editor should check whether ADR-0049/ADR-0087 artifacts reference this comment text (expected: no — it is prose, the property itself was already retired with full ledger discipline under #6656).

Evidence base

#6656 (retirement + ledger), #6978 (census), PR #7081 (consumer deletion).

Activity

  1. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Re-routed domain:spec → domain:spec-surface by the spec-lane seat, executing the maintainer's lane-triage authorization (spec-lane PM session chat, 2026-08-11, verbatim: 「你的车道你可以执行 分类改标」; session session_01JY2Q5Xto1u8YHADgrZDTnk). Routing rationale: a stale source comment describing a retired mechanism is a text-only line — the acceptance surface is untouched, which is exactly the spec-surface criterion (#6298's lane; sweep-first is its default mode). finding grade untouched.


    Generated by Claude Code

  2. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Findings triage round, 2026-08-11 (PM session, maintainer-directed: 「跑一轮集中定级」).

    Graded: promote. Stale contract prose asserting a retired mechanism (captureBefore/ctx.__previous, retired by #6656) is exactly the truth-debt the spec-surface lane exists to clear; S-sized, sweep-eligible with its lane's next batch. packages/spec single-ownership noted in the body stands.

    finding → pm:queue (domain:spec-surface).


    Generated by Claude Code

  3. self-assigned this
    on Aug 12, 2026
  4. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor

    Claim: PM loop round 1 (spec-surface seat, shift of 2026-08-12)
    Session: session_016YBUGvukaeVu9DjKdsHJa9
    Branch: claude/issue-7709-scoped-context-comment
    Worktree: objectstack-issue-7709
    Domain: domain:spec-surface
    File surface: packages/spec/src/contracts/scoped-context.ts — comment-only, the docblock region around L64 (re-anchor by grepping captureBefore/__previous per the card)
    Container & model: S mechanical, mode:subagent, model: sonnet
    Serial constraints cleared: none — no open PR or in-flight claim touches this file (open claude/* PR sweep read 2026-08-12T01:10Z). Premise re-verified on origin/main @ 0dcbc11: L64 still carries the captureBefore prose; #6656 retirement and PR #7081 consumer deletion both landed.


    Generated by Claude Code

  5. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor

    os-dev-report

    {
      "issue": 7709,
      "status": "done",
      "branch": "claude/issue-7709-scoped-context-comment",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/7874",
      "premise_still_valid": true,
      "summary": "packages/spec/src/contracts/scoped-context.ts:64 (the sudo() exclusion note in IScopedContext's evidence-bar docblock) named plugin-audit's retired `captureBefore` stash as one of the two real api.sudo() callers. Re-pointed the sentence at `resolveLookupTitles`, the other currently-live api.sudo() caller in audit-writers.ts (alongside persistAuditTrailRow, unchanged), dropping the captureBefore reference entirely per the recommended route since no historical contrast was needed. Swept the whole contracts/ dir and repo for captureBefore/__previous: no other stale reference remains under contracts/.",
      "tests": "pnpm --filter '@objectstack/spec' build -- green, confirmed the docblock is a floating module-top comment separated by a blank line from the nearest interface (IScopedObjectRepository) both in source and in the emitted packages/spec/dist/analytics.zod-*.d.ts, so it does not attach to hover on any exported symbol. pnpm --filter '@objectstack/spec' typecheck -- green (tsc --noEmit, check:scripts-typecheck, check:test-typecheck all OK). pnpm --filter '@objectstack/spec' test -- 378 files / 9970 tests passed. node scripts/check-nul-bytes.mjs -- OK (7206 files scanned). node scripts/check-adr-anchors.mjs -- OK (48 anchored files, 22517 citations resolve). node scripts/check-engine-double-contract.mjs -- OK (161 pinned, 133 debt, 2 exempt; scoped-context.ts's declared face untouched by this comment-only change).",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    Generated by Claude Code

  6. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor

    ACCEPT (PM review, session session_016YBUGvukaeVu9DjKdsHJa9) — PR #7874.

    • Diff verified: a single-line rewrite of the sudo() exclusion note in scoped-context.ts's evidence-bar docblock — the retired captureBefore reference replaced with resolveLookupTitles.
    • The new sentence's factual claim independently re-verified by this seat on origin/main: persistAuditTrailRow (audit-writers.ts:685→690) and resolveLookupTitles (:917→922) both reach api.sudo().
    • Repo-wide sweep for captureBefore/__previous done — no other stale reference under contracts/; remaining hits are truthful history or the unrelated same-named local in import-runner.ts.
    • ADR-0049/0087 artifact check: no references to this prose, as the card expected.
    • No changeset, measured not assumed (floating module-top comment, does not attach to any exported symbol in the emitted .d.ts; no reference page; not an error string) — this seat applies skip-changeset at landing per policy.
    • Gate evidence is real output (build / typecheck / spec suite 378 files 9970 tests / nul-bytes / adr-anchors / engine-double-contract).
    • First line Fixes #7709 is correct — merging closes the card in full.

    Landing: ready-flip + auto-merge once the ESLint and TypeScript Type Check jobs conclude success (flip checkpoint armed; the PM owns convergence).


    Generated by Claude Code

  7. added a commit that references this issue on Aug 17, 2026
    e152dcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions