Skip to content

Require explicit resource IDs for targeted commands - #66

Closed
leo-notte wants to merge 1 commit into
mainfrom
fix/require-explicit-resource-ids
Closed

Require explicit resource IDs for targeted commands#66
leo-notte wants to merge 1 commit into
mainfrom
fix/require-explicit-resource-ids

Conversation

@leo-notte

Copy link
Copy Markdown
Contributor

Summary

  • require explicit session IDs for session, page, and session-backed file commands
  • require explicit function IDs for function resource commands
  • remove current-session and current-function inference and persistence
  • keep cleanup support for legacy stored resource pointers
  • update CLI examples and tests for explicit IDs

Testing

  • go test ./...
  • go test -c -tags integration -o /tmp/notte-cli-explicit-resource-ids-integration.test ./tests/integration
  • golangci-lint pre-commit hook
  • missing-ID behavioral smoke tests

@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes persisted and environment-based session/function targeting in favor of explicit resource ID flags.

  • Requires --session-id across session, page, and session-backed file commands.
  • Requires --function-id across function resource commands.
  • Removes current-resource inference, persistence, and session replacement behavior.
  • Retains cleanup for legacy pointer files and updates documentation, unit tests, and integration tests.

Confidence Score: 5/5

The PR appears safe to merge with explicit resource-ID requirements consistently applied across the targeted commands.

The changed command registrations, handler guards, source resolution, legacy cleanup paths, documentation, and tests align with the intentional removal of implicit resource targeting, with no actionable regression identified.

Important Files Changed

Filename Overview
internal/cmd/sessions.go Removes implicit session resolution and persistence, marks every session-targeting command's ID flag required, and fetches viewer URLs for the explicitly selected session.
internal/cmd/functions.go Removes implicit function resolution and persistence while consistently requiring function IDs on targeted commands.
internal/cmd/page.go Makes the inherited session ID flag required for all page actions and updates command examples.
internal/cmd/files.go Enforces explicit session IDs only for session-backed list and download operations while preserving uploads behavior.
internal/cmd/clear.go Consolidates cleanup of all five historical resource-pointer files without changing the prior fail-fast error semantics.
internal/config/config.go Removes constants for resource ID environment variables and persisted current-resource files that production commands no longer use.
README.md Updates session, page, function, and file workflows to capture and pass resource IDs explicitly.
tests/integration/functions_test.go Replaces implicit function-ID integration coverage with explicit missing-flag behavior coverage.
tests/integration/page_commands_test.go Adds integration coverage verifying page commands reject a missing session ID.

Reviews (1): Last reviewed commit: "Require explicit resource IDs" | Re-trigger Greptile

@leo-notte

Copy link
Copy Markdown
Contributor Author

Closing because the intended scope is the agent skills and examples only; the CLI should retain its current inferred-resource behavior.

@leo-notte leo-notte closed this Aug 10, 2026
@leo-notte
leo-notte deleted the fix/require-explicit-resource-ids branch August 10, 2026 14:32
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