Skip to content

Lark tracer: role changes and current-capability approval checks #1375

Closed

Description

@DoodleBears

Parent

#1372

Specification: #1371

What to build

A Human edits a Bot role's behavioral permissions and explicitly supported management capabilities or reassigns an approved person to another role. The Bot's next on-demand permission lookup for that person returns the current policy and revision; historical Tool Results are not rewritten and the next ordinary message does not receive an automatic policy snapshot. For the already qualified Lark private approval path, only a person with the current role's relevant structured capability can make a native Allow once/Reject decision. An ordinary conversational person can still ask questions but cannot decide an approval.

Acceptance criteria

  • Reuse the Bot DM sidebar to edit role name/text and explicitly selected supported capabilities and to change a person's single assigned role through revision-checked authenticated commands. Empty management capabilities remain valid; no hierarchy, combined roles, or per-person override is added.
  • Fresh permission Tool calls and directory queries report current role/policy revisions after an edit or reassignment, including two lookups in the same Session before/after the change. Historical Tool Results remain dated evidence; request context contains trusted identity rather than automatically injected role permissions. Stale reviews do not overwrite newer state; restart and revoke/rebind preserve current authority.
  • Changing or removing permissions is observable on the next lookup, without promising immediate refresh of model history or interruption of an in-flight arbitrary Shell command. A failed/ambiguous lookup prompts deferral of the governed operation as behavioral policy. Host admission and actual management decisions independently re-check current state even if the Bot never calls the permission Tool.
  • On the existing qualified Lark DM approval path, check the actual authenticated actor, Bot/app scope, current pairing/role, destination, request/receipt correspondence, offered action, and native lifetime immediately before accepting the decision.
  • Demonstrate an actual native call decided Allow once and a separate rejected call. A person with conversational access but no relevant management capability cannot settle the native request, even if they see/copy a card or claim authority in message text.
  • Remove an approver's capability or revoke/reassign them after card delivery; their delayed decision is refused. Preserve existing first-valid-decision, duplicate-click, Web/IM race, owner-invalidity, and restart fences.
  • Behavioral text, quoted administrators, visible controls, mixed-author batches, cron work, and Assignments do not mint management capability. Approval authority does not imply automatic standing approval for future commands; native execution roles and external-user roles remain distinct.
  • Preserve legacy explicit management grants without broadening them or silently deriving ordinary conversation eligibility from them. Ordinary access and operational powers do not grant each other implicitly.
  • Integrate capability checks for management actions actually supported when implemented. Do not claim the stored answer/save-rules names are delivered paths. Native questions, new saved-rule controls, group destinations, and other providers remain with Lark tracer: native Human questions answered from the paired DM #1031/Lark tracer: explicitly saved approval rules and creator-authorization revocation #1033/Lark tracer: management conversation destinations with per-actor question and approval checks #1034 and existing sibling tickets; do not duplicate or take over those claims.
  • Public intake/review/approval-service tests and focused Client interaction tests verify current-state changes and actual native outcomes; provide a runnable isolated Host and real Lark private-control demonstration with sanitized UI evidence.
  • Update affected architecture and bilingual operational documentation, explicitly distinguishing behavioral prompt policy from deterministic management authority.

Blocked by

#1374: scoped directory and completed first-flow Human acceptance. This is the agreed delivery/feedback gate. The existing private approval baseline #1029 is already delivered; open questions/save-rules/group-management work does not block this narrow slice.

Activity

  1. added
    ready-for-agentFully specified, ready for an AFK agent
    area:fullstackEnd-to-end Host and Client implementation
    feature:messagingMessaging module and external providers
    scope:tracerHuman-testable implementation slice
    on Oct 10, 2026
  2. DoodleBears commented on Oct 10, 2026

    @DoodleBears
    ContributorAuthor

    Product follow-up — reviewed one-time Lark pairing code

    The Human confirmed this request concerns Lark/IM, not an email integration: let a currently authorized reviewer select/approve an applicant's role and issue a pairing code; the applicant supplies it to the same Bot so reviewers need not open the Web UI and more than one eligible reviewer can help.

    Keep this as a proposed extension to this issue's review/reassignment scope, after #1374's complete Human acceptance; it does not widen the current #1373/#1374 implementation claim or clear the native dependency.

    Proposed Host boundary: a deterministic reviewer action checks current structured review authority, selects one existing role, and issues a short-lived single-use unpredictable code bound to the pending request/revision, original trusted platform actor and current Bot/App/Binding. Store a verifier rather than the plaintext code, bound failed attempts, and reject expiry, revocation, a changed Binding or a different actor. A public request reference is a locator, not an authorization code; forwarding it alone cannot approve anyone. Querying or knowing another person's permissions does not confer reviewer powers.

    Redeeming a reviewed code uses trusted Provider identity and no LLM/Inbox Admission/wake/Task for that control message. It does not replay the blocked request: persist the pairing and send the same fixed re-ask notice. Preserve the reviewer/decision/redemption audit trail and existing Web review as another explicit entrance. Natural-language role policy remains prompt behavior, not Shell/resource ACLs.

    The exact reviewer command, recipient-facing format, approval/issuance timing and notification destination still need the implementation specification. Existing #1027/#1029/#1019 management authority remains the seam; no global reusable admin key or new DSH-native RBAC is implied.

  3. DoodleBears commented on Oct 10, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Codex
    • Task: codex/local/01a12734-8226-7ae3-8d1b-db08bde64d76 (not a DSH Session)
    • Issue scope: revision-checked sidebar Role edits and single-role reassignment, fresh on-demand authority, and current structured-capability checks on the existing qualified Lark DM Allow once/Reject path; preserve legacy management grants and sibling claims.
    • Branch: codex/1375-lark-current-role-authority
    • Started: 2026-10-10 21:08 UTC
    • State: active

    Rechecked the live issue, comments, native dependency, sub-issues and open implementation PRs. No competing #1375 claim found. Native #1374 remains open; implementation is stacked on its reviewed candidate, not treated as merged. The Human accepted #1374's complete first-flow evidence and requested continuation after CI; its current-head full CI passed. No dependency removal, merge or deployment is implied.

    The proposed one-time pairing-code extension remains a recorded follow-up pending its exact reviewer command and issuance contract. This claim starts with the approved Role/current-capability slice; it does not take over questions, saved rules or group-management destinations.

  4. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    in-progressHeld by an agent session; see Claim comment for who
    on Oct 10, 2026
  5. DoodleBears commented on Oct 10, 2026

    @DoodleBears
    ContributorAuthor

    Role changes and qualified private decisions — real QA

    • Task: codex/local/01a12734-8226-7ae3-8d1b-db08bde64d76; active claim.
    • Independent QA1 BotHarness Inline Setup QA Create the app inside Bind app: Lark credentials and WeChat QR (Provider setup capability) #1111, in the Human-coordinated exclusive receiver window; one isolated Host and one qualified Consumer, no production takeover.
    • 2026-10-10 21:13–21:23 UTC: edited an ordinary Role's name/behavior and explicitly selected approve/reject in the Bot DM sidebar. Query A returned Role revision 3, policy revision 3 and both capabilities.
    • Actual native Allow once: approval/decided sequence 219, Tool Result 220 succeeded and printed the one requested marker. Separate Reject: sequence 242, Tool Result 243 reported rejection and never printed the rejected marker. These were real model calls and real Lark callbacks, not simulated card clicks.
    • Delivered a third card, removed both capabilities through the sidebar, then clicked its delayed Allow once. The Host refused the IM decision and retained the pending native request; authenticated Web Reject subsequently cleaned it up. Native decision 263/Tool Result 264 rejected, with no delayed marker printed. This cleanup is not evidence of IM authorization.
    • Fresh query B in the same Session returned Role revision 4, policy revision 4 and empty capabilities; historical query A remained unchanged.
    • Reassigned the approved person to Documentation colleague through the sidebar. Fresh query C returned Role revision 1, policy revision 5 and pairing revision 3, with no capabilities; the older approval destination revision became unavailable.
    • Rebuilt and restarted the exact owned Host in the same isolated Profile. Query D retained those revisions and a real DM reply calculated 107×109 = 11663. Client diagnostic state was shell-ready, and no new rendered error was observed.
    • QA1's existing message scopes and selected test availability were preserved. Enabled the separately required long-connection card.action.trigger callback and published independent test version 0.0.3; no GitHub secrets or production App changes.
    • Human feedback: accepted this interaction in this thread. No merge/deployment implied.

    Validation: 21 focused pairing/approval/Client tests plus the active-run current-role test passed; the final Client cancel-reset build was verified with 4 Client tests. Lint, typecheck, format check, build and bilingual Release Ledger checks passed. Full current-head CI passed. Implementation is PR #1387, commit 91dca444; review/merge remains outstanding.

    Private before/after shell evidence is retained locally. The real Profile contains private platform identifiers, working paths and earlier conversation history; the browser provides no file-attachment/upload capability for publishing a safely cropped comparable pair. Review the runnable flow in an isolated Profile: open Bot DM sidebar → IM roles and pairing → Edit role → select only Allow once/Reject → Save; select another role for an approved person → Assign selected role → refresh permissions/directory; configure the qualified DM destination and compare actual Allow once/Reject and delayed refusal. No raw private screenshot is attached publicly.

  6. 16 remaining items

  7. DoodleBears commented on Oct 11, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome — compact UI / audit-time revision handed off

  8. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 11, 2026
  9. DoodleBears commented on Oct 11, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — approved stack integration

    • Task: codex/local/01a12734-8226-7ae3-8d1b-db08bde64d76; state: active.
    • Scope: resume this same task after Human approval; integrate current main through the reviewed parent stack, verify final heads, merge in dependency order and record completion. Live claims/latest outcomes identify only this task. Existing behavior and accepted real QA remain unchanged; no receiver/deployment change.
  10. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 11, 2026
  11. DoodleBears commented on Oct 11, 2026

    @DoodleBears
    ContributorAuthor

    The previously recorded one-time IM pairing-code proposal now has focused design follow-up #1404, a native child of #1372 in Project #10. It remains needs-triage pending its exact reviewer capability, delegation and command/issuance contract; #1375 completion covers only the approved Role/current-capability slice. No code-flow implementation or acceptance is claimed.

  12. DoodleBears commented on Oct 11, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome — completed for the reviewed Role/current-capability slice. Task codex/local/01a12734-8226-7ae3-8d1b-db08bde64d76. PR #1387 merged into main at 11776ea from exact head d865ee8; refreshed full CI passed: https://github.com/BotHarness/DeepSeekBot/actions/runs/38117292952 . The Human accepted real revision-aware Role edits, reassignment, Allow once/Reject, removed-capability stale refusal, restart and revised full UI flow, then authorized merge. Native #1374 and its complete Human-feedback gate are fulfilled. One-time IM pairing codes are separate unimplemented design #1404; external users/groups are #1392. CodeRabbit skipped the stacked base and is not a new independent review. No deployment/receiver restart.

  13. moved this from Todo to Done in Roadmapon Oct 11, 2026
  14. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    in-progressHeld by an agent session; see Claim comment for who
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationfeature:messagingMessaging module and external providersready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions