fix(notifications): resolve intermediate notifications dir only for exact unlink - #3834
Conversation
…xact unlink Successor to closed Yeachan-Heo#3832. Multi-account layouts that share notifications/ via a directory symlink still need intermediate reparse points resolved before native exact unlink can retire transition locks. Full-path realpath followed final components and could race a final-component symlink swap past native AT_SYMLINK_NOFOLLOW. Canonicalize only the parent directory and rejoin the original basename so native mutation still no-follows the final path component. Bump DAEMON_GENERATION 49→50 and refresh the generation guard manifest for the protected exactUnlinkNotificationFile change. Lore-id: 3761act02 Constraint: final-component file symlink must remain reparse_point under TOCTOU Constraint: do not claim full Yeachan-Heo#3761 closure -- bounded activation slice only Rejected: full-file realpathSync | weakens final-component no-follow under race Confidence: high Scope-risk: narrow Reversibility: easy Tested: issue-3761-symlinked-notifications-activation; generation-50 pin; generation-guard suite; coding-agent check Not-tested: live Linux multi-account Telegram bot inbound round-trip Refs Yeachan-Heo#3761
REQUEST_CHANGES — GLM-DeepSeek exact-head hostile reviewSigned terminal disposition for PR #3834, the successor to closed #3832, against exact Exact head / base / CI
Source review — all three prior #3832 blocking findings resolved
Scope adherence
CI failures on this head — classifiedThree exact-head CI jobs failed:
Verdict: the three red jobs are a pre-existing dev-base regression from #3813, not a defect of #3834. They block the mergeability signal but are not attributable to this PR's changes. That pre-existing failure is a separate owner-lane concern (the #3813 seam needs classification in SEAM_TO_SDK or LOCKED_EXCLUSIONS, or the source refactored to a reviewed name) and is out of scope for this bounded #3761 symlink repair. Verdict: REQUEST_CHANGESThe implementation direction is admitted and all three prior #3832 blocking findings are correctly resolved; the source change is sound and the TOCTOU + generation + formatting closures are genuine. This PR is not merge-ready solely because exact-head CI is red. Per owner batch policy the mergeability signal must be green on the exact current head before approval; the red jobs cannot be transferred as "pre-existing" across a merge. Required path for the successor: (a) resolve the pre-existing Contributor ledger / external policy
Credit does not create overlapping mutation ownership. Signed: GJC owner batch (GLM-DeepSeek lane) / Yeachan-Heo / 2026-08-05 |
…entory Yeachan-Heo#3813 added AgentSession.registerToolSessionTransitionCleanup for shared artifact-manager ownership on session transitions. The method is an internal lifecycle registration seam, parallel to registerToolSessionCleanup, but was never added to LOCKED_EXCLUSIONS. Exact-head Dev CI then fails the generated SDK operation inventory check on any PR based on current dev. Classify the seam as a locked exclusion and regenerate the committed matrix. Lore-id: 3813seam01 Constraint: do not expose as a public SDK control Rejected: map to a new SDK operation | no user-facing control exists Confidence: high Scope-risk: narrow Reversibility: easy Tested: sdk-operation-inventory.test.ts (17 pass); inventory --check Not-tested: full coding-agent shard matrix on CI Refs Yeachan-Heo#3813
|
Pushed an additional commit on this head to clear the pre-existing
Notification fix commits are unchanged. Exact-head CI should now pass the SDK operation inventory / shard-1 path. |
Summary
Successor to closed PR #3832 addressing exact-head REQUEST_CHANGES.
Bounded slice of #3761 (does not auto-close the issue): multi-account layouts that share
notifications/via a directory symlink could not retire transition locks because nativeexact_unlinkrejects intermediate reparse points. That lefttelegram-daemon.stealbehind and failed setup with provisional ownership that could not be retired safely while durable settings stayed armed.Changes vs #3832
dirname(file)viarealpathSync, then rejoin the original basename beforenative.exactUnlink. Native still appliesAT_SYMLINK_NOFOLLOWto the final path component at mutation time. Full-filerealpathSync(file)from fix(notifications): activate daemon through symlinked notifications dirs (#3761) #3832 is removed.reparse_pointwith target and alias retained.DAEMON_GENERATION49→50, document generation 50 in the contract, pin test, regeneratescripts/telegram-daemon-generation-manifest.jsonafter guarded edits.bun --cwd=packages/coding-agent run checkgreen.Test plan
bun test packages/coding-agent/test/issue-3761-symlinked-notifications-activation.test.ts— 4 passnotifications-telegram-daemon.test.tsbun test scripts/telegram-daemon-generation-guard.test.ts— 48 passbun scripts/telegram-daemon-generation-guard.ts --validate-current-treebun scripts/telegram-daemon-generation-guard.ts <upstream/dev> <head>(immutable revisions)bun --cwd=packages/coding-agent run checkScope
Refs #3761only — not full issue closure (owner-required live Telegram boundary remains open).