originator: codex-tui

subagent: review

thread_source: subagent

model_provider: openai

text:
# Review guidelines:

You are acting as a reviewer for a proposed code change made by another engineer.

Below are some default guidelines for determining whether the original author would appreciate the issue being flagged.

These are not the final word in determining whether an issue is a bug. In many cases, you will encounter other, more specific guidelines. These may be present elsewhere in a developer message, a user message, a file, or even elsewhere in this system message.
Those guidelines should be considered to override these general instructions.

Here are the general guidelines for determining whether something is a bug and should be flagged.

1. It meaningfully impacts the accuracy, performance, security, or maintainability of the code.
2. The bug is discrete and actionable (i.e. not a general issue with the codebase or a combination of multiple issues).
3. Fixing the bug does not demand a level of rigor that is not present in the rest of the codebase (e.g. one doesn't need very detailed comments and input validation in a repository of one-off scripts in personal projects)
4. The bug was introduced in the commit (pre-existing bugs should not be flagged).
5. The author of the original PR would likely fix the issue if they were made aware of it.
6. The bug does not rely on unstated assumptions about the codebase or author's intent.
7. It is not enough to speculate that a change may disrupt another part of the codebase, to be considered a bug, one must identify the other parts of the code that are provably affected.
8. The bug is clearly not just an intentional change by the original author.

When flagging a bug, you will also provide an accompanying comment. Once again, these guidelines are not the final word on how to construct a comment -- defer to any subsequent guidelines that you encounter.

1. The comment should be clear about why the issue is a bug.
2. The comment should appropriately communicate the severity of the issue. It should not claim that an issue is more severe than it actually is.
3. The comment should be brief. The body should be at most 1 paragraph. It should not introduce line breaks within the natural language flow unless it is necessary for the code fragment.
4. The comment should not include any chunks of code longer than 3 lines. Any code chunks should be wrapped in markdown inline code tags or a code block.
5. The comment should clearly and explicitly communicate the scenarios, environments, or inputs that are necessary for the bug to arise. The comment should immediately indicate that the issue's severity depends on these factors.
6. The comment's tone should be matter-of-fact and not accusatory or overly positive. It should read as a helpful AI assistant suggestion without sounding too much like a human reviewer.
7. The comment should be written such that the original author can immediately grasp the idea without close reading.
8. The comment should avoid excessive flattery and comments that are not helpful to the original author. The comment should avoid phrasing like "Great job ...", "Thanks for ...".

Below are some more detailed guidelines that you should apply to this specific review.

HOW MANY FINDINGS TO RETURN:

Output all findings that the original author would fix if they knew about it. If there is no finding that a person would definitely love to see and fix, prefer outputting no findings. Do not stop at the first qualifying finding. Continue until you've listed every qualifying finding.

GUIDELINES:

- Ignore trivial style unless it obscures meaning or violates documented standards.
- Use one comment per distinct issue (or a multi-line range if necessary).
- Use ```suggestion blocks ONLY for concrete replacement code (minimal lines; no commentary inside the block).
- In every ```suggestion block, preserve the exact leading whitespace of the replaced lines (spaces vs tabs, number of spaces).
- Do NOT introduce or remove outer indentation levels unless that is the actual fix.

The comments will be presented in the code review as inline comments. You should avoid providing unnecessary location details in the comment body. Always keep the line range as short as possible for interpreting the issue. Avoid ranges longer than 5–10 lines; instead, choose the most suitable subrange that pinpoints the problem.

At the beginning of the finding title, tag the bug with priority level. For example "[P1] Un-padding slices along wrong tensor dimensions". [P0] – Drop everything to fix.  Blocking release, operations, or major usage. Only use for universal issues that do not depend on any assumptions about the inputs. · [P1] – Urgent. Should be addressed in the next cycle · [P2] – Normal. To be fixed eventually · [P3] – Low. Nice to have.

Additionally, include a numeric priority field in the JSON output for each finding: set "priority" to 0 for P0, 1 for P1, 2 for P2, or 3 for P3. If a priority cannot be determined, omit the field or use null.

At the end of your findings, output an "overall correctness" verdict of whether or not the patch should be considered "correct".
Correct implies that existing code and tests will not break, and the patch is free of bugs and other blocking issues.
Ignore non-blocking issues such as style, formatting, typos, documentation, and other nits.

FORMATTING GUIDELINES:
The finding description should be one paragraph.

OUTPUT FORMAT:

## Output schema  — MUST MATCH *exactly*

```json
{
  "findings": [
    {
      "title": "<≤ 80 chars, imperative>",
      "body": "<valid Markdown explaining *why* this is a problem; cite files/lines/functions>",
      "confidence_score": <float 0.0-1.0>,
      "priority": <int 0-3, optional>,
      "code_location": {
        "absolute_file_path": "<file path>",
        "line_range": {"start": <int>, "end": <int>}
      }
    }
  ],
  "overall_correctness": "patch is correct" | "patch is incorrect",
  "overall_explanation": "<1-3 sentence explanation justifying the overall_correctness verdict>",
  "overall_confidence_score": <float 0.0-1.0>
}
```

* **Do not** wrap the JSON in markdown fences or extra prose.
* The code_location field is required and must include absolute_file_path and line_range.
* Line ranges must be as short as possible for interpreting the issue (avoid ranges over 5–10 lines; pick the most suitable subrange).
* The code_location should overlap with the diff.
* Do not generate a PR fix.


type: message

role: developer

text:
<permissions instructions>
Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `workspace-write`: The sandbox permits reading files, and editing files in `cwd` and `writable_roots`. Editing files in other directories requires approval. Network access is restricted.
Approval policy is currently never. Do not provide the `sandbox_permissions` for any reason, commands will be rejected.
 The writable roots are `/home/Messier82/.codex/memories`, `/home/Messier82/projects/service-book`, `/tmp`.
</permissions instructions>

text:
<apps_instructions>
## Apps (Connectors)
Apps (Connectors) can be explicitly triggered in user messages in the format `[$app-name](app://{connector_id})`. Apps can also be implicitly triggered as long as the context suggests usage of available apps.
An app is equivalent to a set of MCP tools within the `codex_apps` MCP.
An installed app's MCP tools are either provided to you already, or can be lazy-loaded through the `tool_search` tool. If `tool_search` is available, the apps that are searchable by `tools_search` will be listed by it.
Do not additionally call list_mcp_resources or list_mcp_resource_templates for apps.
</apps_instructions>

text:
<skills_instructions>
## Skills
A skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.
### Available skills
- imagegen: Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas. (file: /home/Messier82/.codex/skills/.system/imagegen/SKILL.md)
- openai-docs: Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains. (file: /home/Messier82/.codex/skills/.system/openai-docs/SKILL.md)
- plugin-creator: Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow. (file: /home/Messier82/.codex/skills/.system/plugin-creator/SKILL.md)
- skill-creator: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations. (file: /home/Messier82/.codex/skills/.system/skill-creator/SKILL.md)
- skill-installer: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). (file: /home/Messier82/.codex/skills/.system/skill-installer/SKILL.md)
- gmail:gmail: Manage Gmail inbox triage, mailbox search, thread summaries, action extraction, reply drafting, and email forwarding through connected Gmail data. Use when the user wants to inspect a mailbox or thread, search email with Gmail query syntax, summarize messages, extract decisions and follow-ups, prepare replies or forwarded messages, or organize messages with explicit confirmation before send, archive, delete, or label actions. (file: /home/Messier82/.codex/plugins/cache/openai-curated/gmail/6188456f/skills/gmail/SKILL.md)
- gmail:gmail-inbox-triage: Triage a Gmail inbox into actionable buckets such as urgent, needs reply soon, waiting, and FYI using connected Gmail data. Use when the user asks to triage the inbox, rank what needs attention, find what still needs a reply, or separate important mail from noise. (file: /home/Messier82/.codex/plugins/cache/openai-curated/gmail/6188456f/skills/gmail-inbox-triage/SKILL.md)
- google-calendar:google-calendar: Manage scheduling and conflicts in connected Google Calendar data. Use when the user wants to inspect calendars, compare availability, review conflicts, find a meeting room, review event notes or attachments, add or adjust reminders, place temporary holds, or draft exact create, update, reschedule, or cancel changes with timezone-aware details. (file: /home/Messier82/.codex/plugins/cache/openai-curated/google-calendar/6188456f/skills/google-calendar/SKILL.md)
- google-calendar:google-calendar-daily-brief: Build polished one-day Google Calendar briefs. Use when the user asks for today, tomorrow, or a specific date summary with an agenda, conflict flags, free windows, remaining-meeting readouts, or a calendar brief, and the Google Calendar connector is available. (file: /home/Messier82/.codex/plugins/cache/openai-curated/google-calendar/6188456f/skills/google-calendar-daily-brief/SKILL.md)
- google-calendar:google-calendar-free-up-time: Find ways to open up meaningful free time in a connected Google Calendar. Use when the user wants to clear up their day, make room for focus time, create a longer uninterrupted block, or see the smallest set of calendar changes that would give time back. (file: /home/Messier82/.codex/plugins/cache/openai-curated/google-calendar/6188456f/skills/google-calendar-free-up-time/SKILL.md)
- google-calendar:google-calendar-group-scheduler: Find and rank good meeting times for multiple people using connected Google Calendar data. Use when the user wants to schedule a group meeting, compare candidate slots across several attendees, find the best compromise time, or add a room check after narrowing the attendee-compatible options. (file: /home/Messier82/.codex/plugins/cache/openai-curated/google-calendar/6188456f/skills/google-calendar-group-scheduler/SKILL.md)
- google-calendar:google-calendar-meeting-prep: Build a practical meeting prep brief from a connected Google Calendar event and its nearby context. Use when the user wants to prepare for an upcoming meeting, understand what to read beforehand, pull in linked notes or docs, or get a concise brief on what the meeting appears to require. (file: /home/Messier82/.codex/plugins/cache/openai-curated/google-calendar/6188456f/skills/google-calendar-meeting-prep/SKILL.md)
### How to use skills
- Discovery: The list above is the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.
- Trigger rules: If the user names a skill (with `$SkillName` or plain text) OR the task clearly matches a skill's description shown above, you must use that skill for that turn. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.
- Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.
- How to use a skill (progressive disclosure):
  1) After deciding to use a skill, open its `SKILL.md`. Read only enough to follow the workflow.
  2) When `SKILL.md` references relative paths (e.g., `scripts/foo.py`), resolve them relative to the skill directory listed above first, and only consider other paths if needed.
  3) If `SKILL.md` points to extra folders such as `references/`, load only the specific files needed for the request; don't bulk-load everything.
  4) If `scripts/` exist, prefer running or patching them instead of retyping large code blocks.
  5) If `assets/` or templates exist, reuse them instead of recreating from scratch.
- Coordination and sequencing:
  - If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.
  - Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.
- Context hygiene:
  - Keep context small: summarize long sections instead of pasting them; only load extra files when needed.
  - Avoid deep reference-chasing: prefer opening only files directly linked from `SKILL.md` unless you're blocked.
  - When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.
- Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.
</skills_instructions>

text:
<plugins_instructions>
## Plugins
A plugin is a local bundle of skills, MCP servers, and apps. Below is the list of plugins that are enabled and available in this session.
### Available plugins
- `Gmail`: Work with Gmail using the configured Gmail app connector.
- `Google Calendar`: Connect Google Calendar for scheduling, availability, daily briefs, and event management.
### How to use plugins
- Discovery: The list above is the plugins available in this session.
- Skill naming: If a plugin contributes skills, those skill entries are prefixed with `plugin_name:` in the Skills list.
- Trigger rules: If the user explicitly names a plugin, prefer capabilities associated with that plugin for that turn.
- Relationship to capabilities: Plugins are not invoked directly. Use their underlying skills, MCP tools, and app tools to help solve the task.
- Preference: When a relevant plugin is available, prefer using capabilities associated with that plugin over standalone capabilities that provide similar functionality.
- Missing/blocked: If the user requests a plugin that is not listed above, or the plugin does not have relevant callable capabilities for the task, say so briefly and continue with the best fallback.
</plugins_instructions>

text:
## Memory

You have access to a memory folder with guidance from prior runs. It can save
time and help you stay consistent. Use it whenever it is likely to help.

Decision boundary: should you use memory for a new user query?

- Skip memory ONLY when the request is clearly self-contained and does not need
  workspace history, conventions, or prior decisions.
- Hard skip examples: current time/date, simple translation, simple sentence
  rewrite, one-line shell command, trivial formatting.
- Use memory by default when ANY of these are true:
  - the query mentions workspace/repo/module/path/files in MEMORY_SUMMARY below,
  - the user asks for prior context / consistency / previous decisions,
  - the task is ambiguous and could depend on earlier project choices,
  - the ask is a non-trivial and related to MEMORY_SUMMARY below.
- If unsure, do a quick memory pass.

Memory layout (general -> specific):

- /home/Messier82/.codex/memories/memory_summary.md (already provided below; do NOT open again)
- /home/Messier82/.codex/memories/MEMORY.md (searchable registry; primary file to query)
- /home/Messier82/.codex/memories/skills/<skill-name>/ (skill folder)
  - SKILL.md (entrypoint instructions)
  - scripts/ (optional helper scripts)
  - examples/ (optional example outputs)
  - templates/ (optional templates)
- /home/Messier82/.codex/memories/rollout_summaries/ (per-rollout recaps + evidence snippets)
  - The paths of these entries can be found in /home/Messier82/.codex/memories/MEMORY.md or /home/Messier82/.codex/memories/rollout_summaries/ as `rollout_path`
  - These files are append-only `jsonl`: `session_meta.payload.id` identifies the session, `turn_context` marks turn boundaries, `event_msg` is the lightweight status stream, and `response_item` contains actual messages, tool calls, and tool outputs.
  - For efficient lookup, prefer matching the filename suffix or `session_meta.payload.id`; avoid broad full-content scans unless needed.

Quick memory pass (when applicable):

1. Skim the MEMORY_SUMMARY below and extract task-relevant keywords.
2. Search /home/Messier82/.codex/memories/MEMORY.md using those keywords.
3. Only if MEMORY.md directly points to rollout summaries/skills, open the 1-2
   most relevant files under /home/Messier82/.codex/memories/rollout_summaries/ or
   /home/Messier82/.codex/memories/skills/.
4. If above are not clear and you need exact commands, error text, or precise evidence, search over `rollout_path` for more evidence.
5. If there are no relevant hits, stop memory lookup and continue normally.

Quick-pass budget:

- Keep memory lookup lightweight: ideally <= 4-6 search steps before main work.
- Avoid broad scans of all rollout summaries.

During execution: if you hit repeated errors, confusing behavior, or suspect
relevant prior context, redo the quick memory pass.

How to decide whether to verify memory:

- Consider both risk of drift and verification effort.
- If a fact is likely to drift and is cheap to verify, verify it before
  answering.
- If a fact is likely to drift but verification is expensive, slow, or
  disruptive, it is acceptable to answer from memory in an interactive turn,
  but you should say that it is memory-derived, note that it may be stale, and
  consider offering to refresh it live.
- If a fact is lower-drift and expensive to verify, it is usually fine to
  answer from memory directly.

When answering from memory without current verification:

- If you rely on memory for a fact that you did not verify in the current turn,
  say so briefly in the final answer.
- If that fact is plausibly drift-prone or comes from an older note, older
  snapshot, or prior run summary, say that it may be stale or outdated.
- If live verification was skipped and a refresh would be useful in the
  interactive context, consider offering to verify or refresh it live.
- Do not present unverified memory-derived facts as confirmed-current.
- Prefer a short refresh offer for interactive questions, especially about prior
  results, commands, timing, or older snapshots.

Memory citation requirements:

- If ANY relevant memory files were used: append exactly one
`<oai-mem-citation>` block as the VERY LAST content of the final reply.
  Normal responses should include the answer first, then append the
`<oai-mem-citation>` block at the end.
- Use this exact structure for programmatic parsing:
```
<oai-mem-citation>
<citation_entries>
MEMORY.md:234-236|note=[responsesapi citation extraction code pointer]
rollout_summaries/2026-02-17T21-23-02-LN3m-example.md:10-12|note=[weekly report format]
</citation_entries>
<rollout_ids>
019c6e27-e55b-73d1-87d8-4e01f1f75043
019c7714-3b77-74d1-9866-e1f484aae2ab
</rollout_ids>
</oai-mem-citation>
```
- `citation_entries` is for rendering:
  - one citation entry per line
  - format: `<file>:<line_start>-<line_end>|note=[<how memory was used>]`
  - use file paths relative to the memory base path (for example, `MEMORY.md`,
    `rollout_summaries/...`, `skills/...`)
  - only cite files actually used under the memory base path (do not cite
    workspace files as memory citations)
  - if you used `MEMORY.md` and then a rollout summary/skill file, cite both
  - list entries in order of importance (most important first)
  - `note` should be short, single-line, and use simple characters only (avoid
    unusual symbols, no newlines)
- `rollout_ids` is for us to track what previous rollouts you find useful:
  - include one rollout id per line
  - rollout ids should look like UUIDs (for example,
    `019c6e27-e55b-73d1-87d8-4e01f1f75043`)
  - include unique ids only; do not repeat ids
  - an empty `<rollout_ids>` section is allowed if no rollout ids are available
  - you can find rollout ids in rollout summary files and MEMORY.md
  - do not include file paths or notes in this section
  - For every `citation_entries`, try to find and cite the corresponding rollout id if possible
- Never include memory citations inside pull-request messages.
- Never cite blank lines; double-check ranges.

Updating memories:

You can update the memories **only** when explicitly asked by the user. This must always come from a direct request from the user.
- Write your update in /home/Messier82/.codex/memories/extensions/ad_hoc/notes/
- Each update must be one small file containing what you want to add/delete/update from the memories.
- The name of this file must be `<timestamp>-<short slug>.md`
- Do not try to edit the memory files yourself, only add one update note in /home/Messier82/.codex/memories/extensions/ad_hoc/notes/

========= MEMORY_SUMMARY BEGINS =========
v1

## User Profile
The user is repeatedly working in `/home/Messier82/projects/service-book` on Android implementation, regression-test execution, GitHub review/comment loops, release/store automation, and repo-specific documentation. They use Codex as an execution-oriented collaborator: terse follow-ups like `Implement the plan.`, `Claude left a comment`, `Pushed?`, `Do a full sweep`, or `merge` usually mean continue the current workflow from current repo and GitHub state rather than ask for context again. They care about truthful completion claims, current-head verification, and explicit GitHub closure when reviews are involved. For docs/process work, they prefer concise repository-specific writing with real commands and paths instead of generic templates.

## User preferences
- When the user says `Implement this issue` or `Implement the plan.`, execute directly and carry the work through verification instead of returning plan-only discussion.
- When the user says `Theres a review comment` or `Claude left a comment`, fetch the latest PR comments yourself, treat the newest comment as the source of truth, patch only the newly raised items, rerun the relevant checks, and keep the same branch loop moving.
- When the user asks `Shouldnt test suite pass by the end of the implementation?`, treat that as the default completion bar: compile/unit/style success is not enough if the requested managed-device or integration path is still red.
- When the user asks about review handling and says `you must've left a comment`, leave explicit PR replies when no code change is needed or when current head already satisfies the feedback.
- When the user asks `Pushed?`, `Comment left?`, or asks whether smoke was run, answer with current-head status; rerun the relevant verification first if the branch changed since the earlier run.
- When the user says `merge` or `You can merge it`, merge only after GitHub shows the PR is clean and the expected checks are green or intentionally skipped.
- When a new review round arrives without a broader ask, keep the fix set minimal and leave low-priority cleanup alone unless the latest comment explicitly asks for it.
- For issue/plan review requests like `the same way` or `Do a full sweep`, default to repo-grounded review findings and post the GitHub comment when asked.
- For repo-guide/docs tasks, keep the writing concise and repository-specific; include concrete commands, paths, and naming patterns.

## General Tips
- Environment observed here: UTC, `bash`, memory repo at `/home/Messier82/.codex/memories`, main project scope at `/home/Messier82/projects/service-book`.
- In `service-book`, `gh pr view` is the practical source for review/status inspection; prefer supported JSON fields like `comments`, `reviews`, `latestReviews`, and `statusCheckRollup`.
- The repo’s commit hook already runs `ktlintCheck detekt lintDebug`; budget for that latency on any commit path.
- For Android regression completion in this repo, partial compile/unit/style success is not enough; the requested managed-device target must also pass or be reported as the blocker.
- `generateGmdCoverage` is the proven smoke-baseline refresh path when the user asks about current smoke status on a PR touching UI/regression behavior.
- For sequential validation work, avoid overlapping Gradle runs that share `app/build` outputs; run them sequentially to avoid incremental-compile collisions.
- Search `MEMORY.md` first for `service-book regression`, `dependabot`, `play store`, `settings contact`, or `AGENTS.md`; use `skills/service-book-regression-pr-review-loop/SKILL.md` for active PR follow-up loops and `skills/review-regression-planning-issue/SKILL.md` for regression-planning review/comment workflows.

## What's in Memory

### /home/Messier82/projects/service-book

#### 2026-05-26

- PR #126 Phase 4 review follow-up loop: PR #126, Claude left a comment, gh pr view, gh pr comment, NavRouteCodecTest, NavBackStack.popNonRoot, MutableSharedFlow, mergeStateStatus=UNSTABLE
  - desc: Search this first for the freshest `service-book` PR follow-up memory when the user only surfaces a new review comment and expects the branch loop to continue without restating context.
  - learnings: use the newest PR comment as the source of truth, patch only the flagged items, rerun the focused compile/unit/style gate, and still reply on the PR even while GitHub checks are in progress.

#### 2026-05-25

- PR #125 real-OS regression review closeout: PR #125, regression-phase3-real-saf, RegressionFull, ExternalViewer.assertLaunchOrSkipUi, AppPreferencesImpl.getVaultUriSync, 16 tests finished, 0 failures
  - desc: Search this first for the latest `service-book` regression review-follow-through memory when a branch is already open and the user only surfaces new review comments.
  - learnings: keep review fixes narrow, rerun `ktlintCheck detekt lintDebug` plus the exact managed-device target, and refresh the PR body when the verification story changes.

#### 2026-05-23

- issue #115 regression implementation and PR #124 merge loop: issue #115, regressionCheck, pixel2api33Check, RegressionHelpers.kt, billingManager.isPremium, mergeStateStatus: CLEAN
  - desc: Use this for direct execution of Phase 2 regression work, offline premium verification, review-comment fixes, and merge criteria in `cwd=/home/Messier82/projects/service-book`.
  - learnings: exact managed-device scoping matters, offline premium must be asserted through persisted state, and overlapping Gradle checks should run sequentially.

- issue #114 regression infrastructure and PR #123 review loop: issue #114, app/build.gradle.kts, GradleBuild, ManagedDeviceInstrumentationTestTask, RegressionTierScannerTest, FixtureAssetsRule
  - desc: Use this for Phase 1 regression scaffold wiring, runner-arg injection, scanner/test setup, and repeated PR review-fix behavior in the same repo.
  - learnings: `GradleBuild` child invocations isolate instrumentation filters, reflective runner-arg wiring in `app/build.gradle.kts` is the stable hook point, and cleanup tracking should happen before file writes.

### Older Memory Topics

#### /home/Messier82/projects/service-book

- regression planning issue review and docs full sweeps: gh issue view, docs/plan-regression-tests.md, PR #113, full sweep, testTagsAsResourceId, Quarantined
  - desc: Use this for issue-by-issue review comments or final consistency sweeps across regression planning issues, docs, and related PRs in `cwd=/home/Messier82/projects/service-book`; pair with `skills/review-regression-planning-issue/SKILL.md` when the user asks for the same review workflow again.

- dependabot workflow execution and docs reconciliation: gh pr list --author app/dependabot, latest master, AGP 9, docs/dependabot-workflow.md, CLAUDE.md, GEMINI.md
  - desc: Use this for sequential Dependabot PR handling, latest-`master` rebases between merges, and keeping workflow docs aligned with repo instructions in `cwd=/home/Messier82/projects/service-book`.

- play store release plumbing, store screenshots, and listing surfaces: issue #103, deploy-play-store.yml, workflow_dispatch.inputs.track, distribution/whatsnew, generateStoreScreenshots, aggregateRating
  - desc: Use this for Play Store workflow parameterization, managed-device screenshot output, and public-listing schema decisions in `cwd=/home/Messier82/projects/service-book`.

- Settings Contact item and PR #102 review/smoke/merge loop: SettingsScreen, settings_contact, EmailLaunchRequest, TestTags.SETTINGS_CONTACT_ROW, generateGmdCoverage, PR #102
  - desc: Use this for focused Compose Settings additions that need to be carried through review comments, screenshot refreshes, smoke-baseline reruns, and squash merge in `cwd=/home/Messier82/projects/service-book`.

- AGENTS.md contributor guide authoring and push: AGENTS.md, 200-400 words, TESTING_SETUP.md, CLAUDE.md, GEMINI.md, Bad owner or permissions on /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf
  - desc: Use this for concise repo-guide writing plus the simple commit/push follow-through path, including the local SSH-config push gotcha, in `cwd=/home/Messier82/projects/service-book`.

- service-book PR review follow-up skill: skills/service-book-regression-pr-review-loop/SKILL.md, Claude left a comment, gh pr view, gh pr comment
  - desc: Reusable procedure for active `service-book` PR review loops where the user expects latest-comment triage, narrow fixes, focused validation, and a PR reply before merge in `cwd=/home/Messier82/projects/service-book`.

- review-regression-planning-issue skill: skills/review-regression-planning-issue/SKILL.md, gh issue view, gh pr diff, docs/plan-regression-tests.md
  - desc: Reusable procedure for the repeated `service-book` regression-planning review/comment workflow; use it when the user asks for the same style of issue review or a final full sweep in `cwd=/home/Messier82/projects/service-book`.
========= MEMORY_SUMMARY ENDS =========

When memory is likely relevant, start with the quick memory pass above before
deep repo exploration.


role: user

text:
# AGENTS.md instructions for /home/Messier82/projects/service-book

<INSTRUCTIONS>
# Repository Guidelines

## Project Structure & Module Organization

Yorvana is a single-module Android app. Main Kotlin source lives in `app/src/main/java/com/yorvana`, organized by layer: `data` for repositories and storage, `domain` for shared models, `ui` for Compose screens/components, and `util` for app helpers. Android resources are in `app/src/main/res`. JVM, Robolectric, and screenshot tests live in `app/src/test/java`; instrumented device tests live in `app/src/androidTest/java`, with test assets in `app/src/androidTest/assets`. Project docs are in `docs/`, build configuration is in `build.gradle.kts`, `app/build.gradle.kts`, `gradle/libs.versions.toml`, and quality rules are in `config/detekt/`.

## Build, Test, and Development Commands

- `./gradlew assembleDebug`: build a debug APK.
- `./gradlew testDebugUnitTest`: run JVM unit, Robolectric, and local Compose tests.
- `./gradlew ktlintCheck detekt lintDebug`: run formatting, static analysis, and Android lint checks used by the pre-commit hook.
- `./gradlew verifyRoborazziDebug`: verify screenshot baselines.
- `./gradlew recordRoborazziDebug`: update screenshot baselines after intentional UI changes.
- `./gradlew pixel2api33DebugAndroidTest`: run instrumented tests on the managed Pixel 2 API 33 device.
- `./gradlew verifyWithCoverage -Pcoverage`: generate combined JVM and smoke-test coverage reports.

## Coding Style & Naming Conventions

Use Kotlin with Java 17 targets and Jetpack Compose Material 3. Follow ktlint defaults and the detekt rules in `config/detekt/detekt.yml`; do not work around baseline files without fixing the underlying issue. Keep package paths under `com.yorvana`. Name Compose screen files `FeatureScreen.kt`, ViewModels `FeatureViewModel.kt`, repository interfaces `ThingRepository`, and implementations `ThingRepositoryImpl`. Prefer immutable UI state exposed through `StateFlow`.

## Testing Guidelines

Use JUnit 4, Robolectric, MockK, Truth, Turbine, Compose UI tests, and Roborazzi. Name fast JVM tests `*Test.kt`, local integration tests `*IT.kt`, and screenshot tests `*ScreenshotTest.kt`. Add new Android-dependent integration tests to `app/src/test/java` when Robolectric is sufficient; use `app/src/androidTest/java` only for real OS, SAF, UiAutomator, hardware, or instrumentation-only behavior. Refresh `app/coverage-baselines/gmd_smoke.ec` with `./gradlew generateGmdCoverage` when smoke-covered production flows change.

## Commit & Pull Request Guidelines

Recent history uses short imperative subjects, with conventional prefixes where useful: `build: bump ...`, `docs: add ...`, or plain feature summaries such as `Add contact option to settings (#102)`. Keep commits focused and avoid committing local secrets or generated noise. PRs should describe user-visible behavior, list verification commands run, link related issues, and include screenshots or updated Roborazzi baselines for UI changes. For automated dependency updates, see [Dependabot Resolution Workflow](docs/dependabot-workflow.md).

## Security & Configuration Tips

Do not commit `local.properties` or real signing credentials. Use `app/keystore.properties.template` for release signing setup and local `sentry.dsn.*` values for Sentry configuration. If coverage baselines are Git LFS pointers, run `git lfs pull` before `verifyWithCoverage`.

</INSTRUCTIONS>

text:
<environment_context>
  <cwd>/home/Messier82/projects/service-book</cwd>
  <shell>bash</shell>
  <current_date>2026-05-31</current_date>
  <timezone>Etc/UTC</timezone>
</environment_context>


timezone: Etc/UTC

approval_policy: never

type: workspace-write

type: managed

type: restricted

type: special

kind: root

access: read

type: path

access: write

kind: tmpdir

network: restricted

kind: restricted

personality: pragmatic

mode: default

reasoning_effort: medium

effort: medium

summary: auto


text: current pr


current pr


cmd: git status --short --branch && gh pr view --json number,title,headRefName,baseRefName,state,isDraft,url,mergeStateStatus,statusCheckRollup,reviewDecision,latestReviews,comments


output:
Chunk ID: 2eb339
Wall time: 0.2392 seconds
Process exited with code 1
Original token count: 52
Output:
## dependabot/gradle/io.sentry-sentry-android-8.42.0...origin/dependabot/gradle/io.sentry-sentry-android-8.42.0
error connecting to api.github.com
check your internet connection or https://githubstatus.com


cmd: git branch -vv && git remote -v && git log -1 --oneline --decorate


output:
Chunk ID: 2de398
Wall time: 0.1730 seconds
Process exited with code 0
Original token count: 3069
Output:
  chore/document-dependabot-workflow                                  a65d300 docs: clarify dependabot workflow exception
  chore/phase-2-private-prep                                          1934cd3 [origin/chore/phase-2-private-prep] ci(smoke): add support for [smoke] label trigger
  chore/phase-2-smoke-label-followup                                  f08c6f9 [origin/master: ahead 1, behind 105] ci(smoke): add support for [smoke] label trigger
  chore/phase-3-private-hardening                                     fe7ac1a [origin/master: behind 105] chore: Phase 2 prep for public→private migration (#23)
  ci/free-tier-optimization                                           5aac9a8 [origin/ci/free-tier-optimization] ci: drop unused pull-requests:write scope from reusable workflow
  ci/label-gated-workflows                                            299fd08 [origin/ci/label-gated-workflows] ci: trim artifact retention to fit free-tier storage
  copilot/implement-billing-manager-override                          68f606b [origin/copilot/implement-billing-manager-override] docs: restore paywall plan and smoke test scenarios lost to accidental revert
  copilot/phase-4-viewmodel-paywall-gating                            6385dff [origin/copilot/phase-4-viewmodel-paywall-gating] fix: resolve ViewModelFactory crash and remove SavedStateHandle
  dependabot/github_actions/gradle/actions-6                          81a424d [origin/dependabot/github_actions/gradle/actions-6: gone] build: bump gradle/actions from 4 to 6
  dependabot/gradle/androidx.core-core-ktx-1.18.0                     36bd621 [origin/dependabot/gradle/androidx.core-core-ktx-1.18.0: gone] build: bump androidx.core:core-ktx from 1.13.1 to 1.18.0
  dependabot/gradle/androidx.test.espresso-espresso-intents-3.7.0     4d6167d [origin/dependabot/gradle/androidx.test.espresso-espresso-intents-3.7.0: gone] build: bump androidx.test.espresso:espresso-intents from 3.6.1 to 3.7.0
  dependabot/gradle/com.android.billingclient-billing-ktx-8.3.0       e5c1cda [origin/dependabot/gradle/com.android.billingclient-billing-ktx-8.3.0: gone] ci: cut billable minutes and bound cache size (#65)
  dependabot/gradle/com.android.billingclient-billing-ktx-8.3.0-final de7b69b fix: update Billing Library 8.3.0 compatibility and resolve review comments
  dependabot/gradle/com.android.billingclient-billing-ktx-8.3.0-fixed e5c1cda ci: cut billable minutes and bound cache size (#65)
  dependabot/gradle/com.google.truth-truth-1.4.5                      76b2f65 [origin/dependabot/gradle/com.google.truth-truth-1.4.5: gone] build: bump com.google.truth:truth from 1.4.2 to 1.4.5
  dependabot/gradle/io.sentry-sentry-android-8.41.0                   20cdd44 [origin/dependabot/gradle/io.sentry-sentry-android-8.41.0: gone] build: bump io.sentry:sentry-android from 7.20.0 to 8.41.0
* dependabot/gradle/io.sentry-sentry-android-8.42.0                   f896c56 [origin/dependabot/gradle/io.sentry-sentry-android-8.42.0] test: fix RetryRuleTest and simplify runShell
  docs/finalize-regression-tests-doc                                  0f8bc00 [origin/docs/finalize-regression-tests-doc] docs: finalize regression test suite documentation
  docs/integration-tests-restructure-plan                             a3198fd docs: clarify Robolectric configuration and CI pipeline scheduled checks
  docs/paywall-plan                                                   dca14a0 [origin/docs/paywall-plan] docs: fix BillingManager diagram, launchPurchaseFlow return type, and FAB gate condition
  docs/smoke-tests-plan                                               3814e0e [origin/docs/smoke-tests-plan] docs: clarify state management strategy — flow test vs independent tests
  docs/sync-regression-plan-with-phase-issues                         d501e10 [origin/docs/sync-regression-plan-with-phase-issues] docs: align line-54 sandbox gate and line-215 quarantine authority
  feat/issue-69-crash-reporting                                       813ca90 [origin/feat/issue-69-crash-reporting] docs: add ordering comment and disableSentryNow KDoc (pass-11)
  feat/paywall-phase-3                                                b08471e fix(paywall): address remaining Phase 3 nits
  feat/paywall-phase-5                                                0f1c888 [origin/master: ahead 6, behind 84] test: update PaywallScaffold screenshots
  feat/paywall-ux-rework                                              feee02c [origin/feat/paywall-ux-rework] fix: use onSurface for disabled Save button text color
  feat/report-bug                                                     4184529 fix: address PR review comments for Sentry integration and email validation
  feat/required-field-asterisks                                       cad62b7 Address PR review comments: memoize RequiredLabel, update tests to use string resources, and clarify JaCoCo exclusions
  feat/restructure-tests-phase-1                                      7d24a4d fix: address final PR comments on coverage data and ci workflow
  feat/smoke-test-phase-1                                             c475172 refactor: address final PR feedback
  feat/smoke-test-phase-2-3                                           731b04e test: use unambiguous MakeItem test tags in selectMake
  feature/hardening-nightly-bake                                      ccbecb1 [origin/feature/hardening-nightly-bake] docs: clean up contaminated failed run and update dashboard
  fix/billing-tests-compilation                                       ee7ebb3 [origin/fix/billing-tests-compilation] test: update screenshot baselines after dependency bumps
  fix/issue-57-force-pending                                          b143c74 refactor: address final stylistic review comments
  fix/issue-80-keyboard-hides-inputs                                  a4c4667 fix: resize viewports to remain above keyboard (#80)
  fix/issue-81-email-validation                                       e49dad9 [origin/fix/issue-81-email-validation] chore: address final review comments - fix docs renumbering, redundant dsn param, and test shadowing
  fix/issue-82-feedback-ui                                            8ad5181 [origin/master: ahead 3, behind 61] test: add SCREEN_TITLE test tag to ReportBugScreen and refresh smoke baseline
  fix/issue-83-privacy-ux-refined                                     5fa5513 chore: refresh smoke coverage baseline
  fix/issue-85-premium-dark-mode-visuals                              ac09156 fix: address third-pass review feedback
  fix/issue-87-setup-topbar                                           0a0e111 fix: address code review feedback
  fix/issue-89-back-button-styling                                    5deb744 refactor: expose modifier and wrap TopBarBackButton in Box for better touch target
  fix/settings-learn-more-alignment                                   335a445 test: scroll to 'Report Bug' to fully show 'Learn more' button in screenshot
  implement-store-screenshots                                         f84db06 [origin/implement-store-screenshots] refactor: simplify instrumentation args isolation and address review-15
  issue-103-play-store-release-plumbing                               2bb5f1c [origin/issue-103-play-store-release-plumbing] Document Play release notes limit
  issue-54-paywall-hardening                                          984c9c8 [origin/issue-54-paywall-hardening] fix(ci): unblock release verification on PRs
  master                                                              a238622 [origin/master] ci: disable daily schedule for billing sandbox workflow
  phase-6-paywall-smoke-tests                                         432e10d fix: resolve targeted PR review feedback and refresh smoke baseline
  plan-regression-tests                                               63d8b06 [origin/plan-regression-tests] docs: require non-debug signed test build type for billing sandbox tier
  pr-102-head                                                         8be36a0 Add contact option to settings
  pr-112                                                              9dea594 chore: address review feedback on GMD args, doc consistency, and capture robustness
  pr-113-review                                                       63d8b06 docs: require non-debug signed test build type for billing sandbox tier
  pr-125-latest                                                       cb2ae33 fix: address real OS regression review
  pr-126                                                              b19bfd9 Tighten route persistence regression coverage
  pr-126-head                                                         8d14a3f Tighten migration event handling
  pr-126-review                                                       709f460 Guard root nav back pop
  pr-72                                                               d91c864 refactor: atomic recordConsentDecision and IO-offloaded disableSentryNow (pass-10)
  pr-73                                                               4367e20 fix: address Review #20 a11y and screenshot nits
  pr-73-tmp                                                           1d4410d test: add explanatory comment to fallback email test loop (Review #12)
  pr-86-head                                                          e49dad9 chore: address final review comments - fix docs renumbering, redundant dsn param, and test shadowing
  pr-88                                                               8ad5181 test: add SCREEN_TITLE test tag to ReportBugScreen and refresh smoke baseline
  pr-91                                                               8122e1a fix: restore device-info a11y hint and cleanup orphan screenshots
  pr-91-review                                                        fe1702e fix: address final review feedback and refresh coverage baseline
  pr123-head                                                          886adc5 Track copied cache fixtures before writing
  pr125-head                                                          26a915c fix: stabilize real OS regression suite
  pr126                                                               c65f11f Address lifecycle robustness re-review
  pr127                                                               9ccd7c9 Polish billing sandbox review follow-up
  pr130                                                               a9482e4 merge: merge branch origin/master into feature/hardening-nightly-bake
  pr73                                                                092c662 fix: address Review #15 nits and refresh screenshots
  pr73-review-3                                                       a6c292c refactor: decouple UI string resolution from Submit event
  refactor/migrate-integration-tests                                  06076fc refactor: migrate integration tests to JVM via Robolectric
  regression-phase3-real-saf                                          08387a8 [origin/regression-phase3-real-saf] docs: clarify regression helper assumptions
  regression-phase4-lifecycle-robustness                              8d14a3f [origin/regression-phase4-lifecycle-robustness] Tighten migration event handling
  regression-phase5-billing-sandbox                                   9ccd7c9 [origin/regression-phase5-billing-sandbox] Polish billing sandbox review follow-up
  smoke-tests-step-5                                                  818ea5f refactor: address final PR review comments for reactive observation and UI stability
  smoke-tests-step4-navigation                                        f919f29 [origin/smoke-tests-step4-navigation: ahead 1] fix: address PR #17 review comments on test_07
  test/smoke-tests-improvements                                       5f7b17b [origin/test/smoke-tests-improvements] test: address PR #20 review feedback
  test/smoke-tests-step-6-final-verification                          5ecafa4 docs: clarify GMD test execution commands
origin	git@github.com:yorvana/android.git (fetch)
origin	git@github.com:yorvana/android.git (push)
f896c56 (HEAD -> dependabot/gradle/io.sentry-sentry-android-8.42.0, origin/dependabot/gradle/io.sentry-sentry-android-8.42.0) test: fix RetryRuleTest and simplify runShell


Current local branch:

`dependabot/gradle/io.sentry-sentry-android-8.42.0`

Head commit:

`f896c56 test: fix RetryRuleTest and simplify runShell`

It tracks:

`origin/dependabot/gradle/io.sentry-sentry-android-8.42.0`

I couldn’t fetch PR metadata because `gh` can’t reach `api.github.com` from this environment right now.


role: assistant

text:
Current local branch:

`dependabot/gradle/io.sentry-sentry-android-8.42.0`

Head commit:

`f896c56 test: fix RetryRuleTest and simplify runShell`

It tracks:

`origin/dependabot/gradle/io.sentry-sentry-android-8.42.0`

I couldn’t fetch PR metadata because `gh` can’t reach `api.github.com` from this environment right now.