Skip to content

docs(prompts): align install / runbook / test-writer with LISA loader and CI lint#4527

Open
LiliDeng wants to merge 1 commit into
mainfrom
prompts/runbook-extension-path-fix
Open

docs(prompts): align install / runbook / test-writer with LISA loader and CI lint#4527
LiliDeng wants to merge 1 commit into
mainfrom
prompts/runbook-extension-path-fix

Conversation

@LiliDeng

Copy link
Copy Markdown
Collaborator
  • install-lisa: capture LISA_HOME / PYTHON / VENV after install, write them to /memories/session/lisa-install.md, set env vars, and add troubleshooting for venv-related 'lisa not found' / wrong Python. Require verifying the running LISA's root via python -c 'import lisa, pathlib; print(pathlib.Path(lisa.file).parent.parent)' and recording that path (not pwd) as LISA_HOME.

  • lisa_runbook_generator: add Step 0 to resolve LISA_HOME (session memory -> env var -> workspace probe -> ask user) before emitting YAML; require absolute extension: paths (Rule 8); reflect venv activation in the run command shown to the user; add troubleshooting for ModuleNotFoundError: No module named 'microsoft'. Document _fix_path_for_old_code_layout semantics so 'import_builtin_tests: true' is the primary pattern for microsoft tests.

  • lisa_test_writer: add Step 9 Lint Gate documenting the CI stack (black, isort, flake8, mypy, pylint) inline so generated test cases satisfy pyproject.toml / pylintrc, and require running the five local commands before reporting completion.

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

… and CI lint

- install-lisa: capture LISA_HOME / PYTHON / VENV after install, write
  them to /memories/session/lisa-install.md, set env vars, and add
  troubleshooting for venv-related 'lisa not found' / wrong Python.
  Require verifying the running LISA's root via
  python -c 'import lisa, pathlib; print(pathlib.Path(lisa.__file__).parent.parent)'
  and recording that path (not pwd) as LISA_HOME.

- lisa_runbook_generator: add Step 0 to resolve LISA_HOME (session
  memory -> env var -> workspace probe -> ask user) before emitting
  YAML; require absolute extension: paths (Rule 8); reflect venv
  activation in the run command shown to the user; add troubleshooting
  for ModuleNotFoundError: No module named 'microsoft'. Document
  _fix_path_for_old_code_layout semantics so 'import_builtin_tests: true'
  is the primary pattern for microsoft tests.

- lisa_test_writer: add Step 9 Lint Gate documenting the CI stack
  (black, isort, flake8, mypy, pylint) inline so generated test cases
  satisfy pyproject.toml / pylintrc, and require running the five
  local commands before reporting completion.
Copilot AI review requested due to automatic review settings June 12, 2026 01:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GitHub Copilot prompt docs used for LISA install/runbook/test-writing workflows, aiming to better align the guidance with LISA’s runbook loader behavior and the project’s CI linting expectations.

Changes:

  • Add a mandatory “Lint Gate” step to the test-writer prompt to require local lint/type-check verification before completion.
  • Add a “Locate the executing LISA install” step and clearer guidance around import_builtin_tests vs extension: for Microsoft testsuite loading in runbooks.
  • Extend the install prompt with steps to capture and persist LISA_HOME/PYTHON/VENV in session memory and add troubleshooting for common venv / module import failures.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/prompts/lisa_test_writer.prompt.md Adds a new mandatory lint/typing gate and local command checklist before declaring generated tests “done”.
.github/prompts/lisa_runbook_generator.prompt.md Adds pre-YAML guidance to resolve the executing LISA root and clarifies correct ways to load Microsoft testsuites.
.github/prompts/install-lisa.prompt.md Adds install-path capture + session-memory recording for LISA_HOME/PYTHON/VENV, plus related troubleshooting.

Comment thread .github/prompts/lisa_test_writer.prompt.md
Comment thread .github/prompts/lisa_test_writer.prompt.md
Comment thread .github/prompts/lisa_test_writer.prompt.md
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.

2 participants