Skip to content

feat(read): profile executable session views (#1997) - #2021

Merged
Sinity merged 2 commits into
masterfrom
feature/feat/read-view-profiles-1997
Jun 17, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/feat/read-view-profiles-1997

Conversation

@Sinity

@Sinity Sinity commented Jun 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add a live SessionViewProfile registry for the executable read --view surfaces, derive CLI view choices from that registry, and complete read views from the same profile metadata.

Problem

#1997 identified that the views already exist but their semantics are scattered across Click choices, renderers, docs, and future API plans. Without a live profile record, callers cannot inspect whether a view is raw, lossy, evidence-linked, redacted, or suitable for successor-agent handoff, and stale view names can survive independently in CLI choices. #1844 also expects completion to consume view metadata instead of maintaining a parallel list.

Solution

  • Add polylogue.archive.viewport.profiles with profiles for summary, transcript, messages, raw, context, context-pack, recovery, neighbors, and correlation.
  • Export profile helpers from polylogue.archive.viewport.
  • Derive read --view Click choices/help from read_view_choices().
  • Complete read --view values from READ_VIEW_PROFILES, including profile-derived help text.
  • Add tests proving choices/completion are registry-backed and every profile declares the core contract fields.
  • Regenerate topology for the new viewport module.

Verification

  • nix develop --command devtools test tests/unit/archive/test_view_profiles.py tests/unit/cli/test_query_verbs_runtime.py -k 'view_profile or read_view' -> 8 passed, 16 deselected
  • nix develop --command devtools verify --quick -> exit_code 0
  • pre-push devtools verify --quick -> exit_code 0

Ref #1997
Ref #1844

Problem: #1997 notes that read views already exist but their semantics are scattered across Click choices, renderers, docs, and future API plans. A caller cannot inspect one live record to know whether a view is raw, lossy, evidence-linked, redacted, or suitable for successor-agent handoff.

What changed: add a SessionViewProfile registry for every executable read --view value, export it from archive.viewport, and derive the CLI --view choices/help from that registry. Add tests proving the Click choices are profile-backed and every profile declares the core contract fields. Regenerate topology for the new viewport module.

Verification: nix develop --command devtools test tests/unit/archive/test_view_profiles.py tests/unit/cli/test_query_verbs_runtime.py -k 'view_profile or read_view' (7 passed, 16 deselected); nix develop --command devtools verify --quick (exit_code 0).
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 4 minutes and 48 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7046b651-3788-450d-a9b4-7a026a4e0d3b

📥 Commits

Reviewing files that changed from the base of the PR and between a7837f7 and 1ba1062.

📒 Files selected for processing (7)
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/archive/viewport/__init__.py
  • polylogue/archive/viewport/profiles.py
  • polylogue/cli/query_verbs.py
  • tests/unit/archive/test_view_profiles.py
  • tests/unit/cli/test_query_verbs_runtime.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/read-view-profiles-1997

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity

Sinity commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review

github-actions Bot pushed a commit that referenced this pull request Jun 17, 2026
Problem: #1844/#1997 want completion to consume view metadata rather than keep a parallel static list. After adding SessionViewProfile, read --view still relied on Click choice completion without profile descriptions.

What changed: add a read-view shell completer backed by READ_VIEW_PROFILES and test that recovery completion carries profile-derived help text.

Verification: nix develop --command devtools test tests/unit/archive/test_view_profiles.py tests/unit/cli/test_query_verbs_runtime.py -k 'view_profile or read_view' (8 passed, 16 deselected); nix develop --command devtools verify --quick (exit_code 0).
@Sinity

Sinity commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review latest commit 1ba1062 as well

@Sinity
Sinity merged commit 8febe37 into master Jun 17, 2026
14 checks passed
@Sinity
Sinity deleted the feature/feat/read-view-profiles-1997 branch June 17, 2026 03:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ba1062035

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/archive/viewport/profiles.py Resolved
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 59.F107 / P2: fixed-already at the checked revision: polylogue/cli/query_verbs.py:248 derives accepted read formats directly from READ_VIEW_PROFILES. Advertised plaintext is included in the executable format choices instead of being excluded by a separate hard-coded list.

Only the rows listed above are dispositioned. Held findings remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant