@opengeni/runtime 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/chunk-2PO56VAL.js +3478 -0
  2. package/dist/chunk-2PO56VAL.js.map +1 -0
  3. package/dist/index.d.ts +912 -0
  4. package/dist/index.js +3663 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/sandbox/index.d.ts +1738 -0
  7. package/dist/sandbox/index.js +187 -0
  8. package/dist/sandbox/index.js.map +1 -0
  9. package/package.json +49 -0
  10. package/src/bundled_hashicorp_terraform_skills/LICENSE +373 -0
  11. package/src/bundled_hashicorp_terraform_skills/README.md +18 -0
  12. package/src/bundled_hashicorp_terraform_skills/UPSTREAM_GIT_SHA +1 -0
  13. package/src/bundled_hashicorp_terraform_skills/azure-verified-modules/SKILL.md +613 -0
  14. package/src/bundled_hashicorp_terraform_skills/checkov/SKILL.md +43 -0
  15. package/src/bundled_hashicorp_terraform_skills/refactor-module/SKILL.md +538 -0
  16. package/src/bundled_hashicorp_terraform_skills/social-media-marketing/SKILL.md +35 -0
  17. package/src/bundled_hashicorp_terraform_skills/terraform-search-import/SKILL.md +372 -0
  18. package/src/bundled_hashicorp_terraform_skills/terraform-search-import/references/MANUAL-IMPORT.md +113 -0
  19. package/src/bundled_hashicorp_terraform_skills/terraform-search-import/scripts/list_resources.sh +38 -0
  20. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/SKILL.md +480 -0
  21. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/api-monitoring.md +543 -0
  22. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/component-blocks.md +476 -0
  23. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/deployment-blocks.md +391 -0
  24. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/examples.md +1529 -0
  25. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/linked-stacks.md +187 -0
  26. package/src/bundled_hashicorp_terraform_skills/terraform-stacks/references/troubleshooting.md +671 -0
  27. package/src/bundled_hashicorp_terraform_skills/terraform-style-guide/SKILL.md +353 -0
  28. package/src/bundled_hashicorp_terraform_skills/terraform-test/SKILL.md +451 -0
  29. package/src/bundled_hashicorp_terraform_skills/terraform-test/references/CI_CD.md +80 -0
  30. package/src/bundled_hashicorp_terraform_skills/terraform-test/references/EXAMPLES.md +314 -0
  31. package/src/bundled_hashicorp_terraform_skills/terraform-test/references/MOCK_PROVIDERS.md +171 -0
  32. package/src/codex-tool-search.ts +267 -0
  33. package/src/context-compaction.ts +538 -0
  34. package/src/history-sanitizer.ts +719 -0
  35. package/src/index.ts +3299 -0
  36. package/src/sandbox/capabilities.ts +69 -0
  37. package/src/sandbox/channel-a.ts +1031 -0
  38. package/src/sandbox/display-stack.ts +231 -0
  39. package/src/sandbox/errors.ts +34 -0
  40. package/src/sandbox/index.ts +832 -0
  41. package/src/sandbox/providers/blaxel.ts +35 -0
  42. package/src/sandbox/providers/cloudflare.ts +24 -0
  43. package/src/sandbox/providers/daytona.ts +34 -0
  44. package/src/sandbox/providers/docker.ts +17 -0
  45. package/src/sandbox/providers/e2b.ts +36 -0
  46. package/src/sandbox/providers/index.ts +107 -0
  47. package/src/sandbox/providers/local.ts +13 -0
  48. package/src/sandbox/providers/modal.ts +55 -0
  49. package/src/sandbox/providers/none.ts +13 -0
  50. package/src/sandbox/providers/runloop.ts +32 -0
  51. package/src/sandbox/providers/selfhosted.ts +96 -0
  52. package/src/sandbox/providers/types.ts +38 -0
  53. package/src/sandbox/providers/vercel.ts +29 -0
  54. package/src/sandbox/recording.ts +286 -0
  55. package/src/sandbox/routing/backend-resolver.ts +189 -0
  56. package/src/sandbox/routing/routing-session.ts +455 -0
  57. package/src/sandbox/select.ts +371 -0
  58. package/src/sandbox/selfhosted/capabilities.ts +255 -0
  59. package/src/sandbox/selfhosted/control-rpc.ts +351 -0
  60. package/src/sandbox/selfhosted/session.ts +930 -0
  61. package/src/sandbox/selfhosted/testing.ts +230 -0
  62. package/src/sandbox/stream-port.ts +185 -0
  63. package/src/sandbox/stream-token.ts +90 -0
  64. package/src/sandbox/terminal-server.ts +203 -0
  65. package/src/sandbox-computer.ts +835 -0
@@ -0,0 +1,480 @@
1
+ ---
2
+ name: terraform-stacks
3
+ description: Comprehensive guide for working with HashiCorp Terraform Stacks. Use when creating, modifying, or validating Terraform Stack configurations (.tfcomponent.hcl, .tfdeploy.hcl files), working with stack components and deployments from local modules, public registry, or private registry sources, managing multi-region or multi-environment infrastructure, or troubleshooting Terraform Stacks syntax and structure.
4
+ metadata:
5
+ copyright: Copyright IBM Corp. 2026
6
+ version: "0.0.1"
7
+ ---
8
+
9
+ # Terraform Stacks
10
+
11
+ Terraform Stacks simplify infrastructure provisioning and management at scale by providing a configuration layer above traditional Terraform modules. Stacks enable declarative orchestration of multiple components across environments, regions, and cloud accounts.
12
+
13
+ ## Core Concepts
14
+
15
+ **Stack**: A complete unit of infrastructure composed of components and deployments that can be managed together.
16
+
17
+ **Component**: An abstraction around a Terraform module that defines infrastructure pieces. Each component specifies a source module, inputs, and providers.
18
+
19
+ **Deployment**: An instance of all components in a stack with specific input values. Use deployments for different environments (dev/staging/prod), regions, or cloud accounts.
20
+
21
+ **Stack Language**: A separate HCL-based language (not regular Terraform HCL) with distinct blocks and file extensions.
22
+
23
+ ## File Structure
24
+
25
+ Terraform Stacks use specific file extensions:
26
+
27
+ - **Component configuration**: `.tfcomponent.hcl`
28
+ - **Deployment configuration**: `.tfdeploy.hcl`
29
+ - **Provider lock file**: `.terraform.lock.hcl` (generated by CLI)
30
+
31
+ All configuration files must be at the root level of the Stack repository. HCP Terraform processes all files in dependency order.
32
+
33
+ ### Recommended File Organization
34
+
35
+ ```
36
+ my-stack/
37
+ ├── .terraform-version # The required Terraform version for this Stack
38
+ ├── variables.tfcomponent.hcl # Variable declarations
39
+ ├── providers.tfcomponent.hcl # Provider configurations
40
+ ├── components.tfcomponent.hcl # Component definitions
41
+ ├── outputs.tfcomponent.hcl # Stack outputs
42
+ ├── deployments.tfdeploy.hcl # Deployment definitions
43
+ ├── .terraform.lock.hcl # Provider lock file (generated)
44
+ └── modules/ # Local modules (optional - only if using local modules)
45
+ ├── s3/
46
+ └── compute/
47
+ ```
48
+
49
+ **Note**: The `modules/` directory is only required when using local module sources. Components can reference modules from:
50
+ - Local file paths: `./modules/vpc`
51
+ - Public registry: `terraform-aws-modules/vpc/aws`
52
+ - Private registry: `app.terraform.io/<org-name>/vpc/aws`
53
+ - Git: `git::https://github.com/org/repo.git//path?ref=v1.0.0`
54
+
55
+ HCP Terraform processes all `.tfcomponent.hcl` and `.tfdeploy.hcl` files in dependency order.
56
+
57
+ ## Required Terraform version (.terraform-version)
58
+
59
+ Use Terraform v1.13.x or later to access the Stacks CLI plugin and to run
60
+ terraform stacks CLI commands. Begin by adding a .terraform-version file to
61
+ your Stack's root directory to specify the Terraform version required for your
62
+ Stack. For example, the following file specifies Terraform v1.14.5:
63
+
64
+ ```
65
+ 1.14.5
66
+ ```
67
+
68
+ ## Component Configuration (.tfcomponent.hcl)
69
+
70
+ ### Variable Block
71
+
72
+ Declare input variables for the Stack configuration. Variables must define a `type` field and do not support the `validation` argument.
73
+
74
+ ```hcl
75
+ variable "aws_region" {
76
+ type = string
77
+ description = "AWS region for deployments"
78
+ default = "us-west-1"
79
+ }
80
+
81
+ variable "identity_token" {
82
+ type = string
83
+ description = "OIDC identity token"
84
+ ephemeral = true # Does not persist to state file
85
+ }
86
+
87
+ variable "instance_count" {
88
+ type = number
89
+ nullable = false
90
+ }
91
+ ```
92
+
93
+ **Important**: Use `ephemeral = true` for credentials and tokens (identity tokens, API keys, passwords) to prevent them from persisting in state files. Use `stable` for longer-lived values like license keys that need to persist across runs.
94
+
95
+ ### Required Providers Block
96
+
97
+ ```hcl
98
+ required_providers {
99
+ aws = {
100
+ source = "hashicorp/aws"
101
+ version = "~> 6.0"
102
+ }
103
+ random = {
104
+ source = "hashicorp/random"
105
+ version = "~> 3.5.0"
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### Provider Block
111
+
112
+ Provider blocks differ from traditional Terraform:
113
+
114
+ 1. Support `for_each` meta-argument
115
+ 2. Define aliases in the block header (not as an argument)
116
+ 3. Accept configuration through a `config` block
117
+
118
+ **Single Provider Configuration:**
119
+
120
+ ```hcl
121
+ provider "aws" "this" {
122
+ config {
123
+ region = var.aws_region
124
+ assume_role_with_web_identity {
125
+ role_arn = var.role_arn
126
+ web_identity_token = var.identity_token
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ **Multiple Provider Configurations with for_each:**
133
+
134
+ ```hcl
135
+ provider "aws" "configurations" {
136
+ for_each = var.regions
137
+
138
+ config {
139
+ region = each.value
140
+ assume_role_with_web_identity {
141
+ role_arn = var.role_arn
142
+ web_identity_token = var.identity_token
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ **Authentication Best Practice**: Use **workload identity** (OIDC) as the preferred authentication method for Stacks. This approach:
149
+ - Avoids long-lived static credentials
150
+ - Provides temporary, scoped credentials per deployment run
151
+ - Integrates with cloud provider IAM (AWS IAM Roles, Azure Managed Identities, GCP Service Accounts)
152
+ - Eliminates need for platform-managed environment variables
153
+
154
+ Configure workload identity using `identity_token` blocks and `assume_role_with_web_identity` in provider configuration. For detailed setup instructions for AWS, Azure, and GCP, see: https://developer.hashicorp.com/terraform/cloud-docs/dynamic-provider-credentials
155
+
156
+ ### Component Block
157
+
158
+ Each Stack requires at least one component block. Add a component for each module to include in the Stack. Components reference modules from local paths, registries, or Git.
159
+
160
+ ```hcl
161
+ component "vpc" {
162
+ source = "app.terraform.io/my-org/vpc/aws" # Local, registry, or Git URL
163
+ version = "2.1.0" # For registry modules
164
+
165
+ inputs = {
166
+ cidr_block = var.vpc_cidr
167
+ name_prefix = var.name_prefix
168
+ }
169
+
170
+ providers = {
171
+ aws = provider.aws.this
172
+ }
173
+ }
174
+ ```
175
+
176
+ See `references/component-blocks.md` for examples of dependencies, for_each, public registry modules, Git sources, and more.
177
+
178
+ **Key Points:**
179
+ - Reference outputs: `component.<name>.<output>` or `component.<name>[key].<output>` for for_each
180
+ - Dependencies inferred automatically from component references
181
+ - Aggregate with for expressions: `[for x in component.s3 : x.bucket_name]`
182
+ - For components with `for_each`, reference specific instances: `component.<name>[each.value].<output>`
183
+ - Provider references are normal values: `provider.<type>.<alias>` or `provider.<type>.<alias>[each.value]`
184
+
185
+ ### Output Block
186
+
187
+ Outputs require a `type` argument and do not support `preconditions`:
188
+
189
+ ```hcl
190
+ output "vpc_id" {
191
+ type = string
192
+ description = "VPC ID"
193
+ value = component.vpc.vpc_id
194
+ }
195
+
196
+ output "endpoint_urls" {
197
+ type = map(string)
198
+ value = {
199
+ for region, comp in component.api : region => comp.endpoint_url
200
+ }
201
+ sensitive = false
202
+ }
203
+ ```
204
+
205
+ ### Locals Block
206
+
207
+ Locals blocks work the same in both `.tfcomponent.hcl` and `.tfdeploy.hcl` files:
208
+
209
+ ```hcl
210
+ locals {
211
+ common_tags = {
212
+ Environment = var.environment
213
+ ManagedBy = "Terraform Stacks"
214
+ Project = var.project_name
215
+ }
216
+
217
+ region_config = {
218
+ for region in var.regions : region => {
219
+ name_suffix = "${var.environment}-${region}"
220
+ }
221
+ }
222
+ }
223
+ ```
224
+
225
+ ### Removed Block
226
+
227
+ Use to safely remove components from a Stack. HCP Terraform requires the component's providers to remove it.
228
+
229
+ ```hcl
230
+ removed {
231
+ from = component.old_component
232
+ source = "./modules/old-module"
233
+
234
+ providers = {
235
+ aws = provider.aws.this
236
+ }
237
+ }
238
+ ```
239
+
240
+ ## Deployment Configuration (.tfdeploy.hcl)
241
+
242
+ ### Identity Token Block
243
+
244
+ Generate JWT tokens for OIDC authentication with cloud providers:
245
+
246
+ ```hcl
247
+ identity_token "aws" {
248
+ audience = ["aws.workload.identity"]
249
+ }
250
+
251
+ identity_token "azure" {
252
+ audience = ["api://AzureADTokenExchange"]
253
+ }
254
+ ```
255
+
256
+ Reference tokens in deployments using `identity_token.<name>.jwt`
257
+
258
+ ### Store Block
259
+
260
+ Access HCP Terraform variable sets within Stack deployments:
261
+
262
+ ```hcl
263
+ store "varset" "aws_credentials" {
264
+ id = "varset-ABC123" # Alternatively use: name = "varset_name"
265
+ source = "tfc-cloud-shared"
266
+ category = "terraform" # Alternatively use: category = "env" for environment variables
267
+ }
268
+
269
+ deployment "production" {
270
+ inputs = {
271
+ aws_access_key = store.varset.aws_credentials.AWS_ACCESS_KEY_ID
272
+ }
273
+ }
274
+ ```
275
+
276
+ Use to centralize credentials and share variables across Stacks. See `references/deployment-blocks.md` for details.
277
+
278
+ ### Deployment Block
279
+
280
+ Define deployment instances (minimum 1, maximum 20 per Stack):
281
+
282
+ ```hcl
283
+ deployment "production" {
284
+ inputs = {
285
+ aws_region = "us-west-1"
286
+ instance_count = 3
287
+ role_arn = local.role_arn
288
+ identity_token = identity_token.aws.jwt
289
+ }
290
+ }
291
+
292
+ # Create multiple deployments for different environments
293
+ deployment "development" {
294
+ inputs = {
295
+ aws_region = "us-east-1"
296
+ instance_count = 1
297
+ name_suffix = "dev"
298
+ role_arn = local.role_arn
299
+ identity_token = identity_token.aws.jwt
300
+ }
301
+ }
302
+ ```
303
+
304
+ **To destroy a deployment**: Set `destroy = true`, upload configuration, approve destroy run, then remove the deployment block. See `references/deployment-blocks.md` for details.
305
+
306
+ ### Deployment Group Block
307
+
308
+ Group deployments together for shared settings (HCP Terraform Premium tier feature). Free/standard tiers use default groups named `{deployment-name}_default`.
309
+
310
+ ```hcl
311
+ deployment_group "canary" {
312
+ auto_approve_checks = [deployment_auto_approve.safe_changes]
313
+ }
314
+
315
+ deployment "dev" {
316
+ inputs = { /* ... */ }
317
+ deployment_group = deployment_group.canary
318
+ }
319
+ ```
320
+
321
+ Multiple deployments can reference the same group. See `references/deployment-blocks.md` for details.
322
+
323
+ ### Deployment Auto-Approve Block
324
+
325
+ Define rules to automatically approve deployment plans (HCP Terraform Premium tier feature):
326
+
327
+ ```hcl
328
+ deployment_auto_approve "safe_changes" {
329
+ deployment_group = deployment_group.canary
330
+
331
+ check {
332
+ condition = context.plan.changes.remove == 0
333
+ reason = "Cannot auto-approve plans with resource deletions"
334
+ }
335
+ }
336
+ ```
337
+
338
+ **Available context variables**: `context.plan.applyable`, `context.plan.changes.add/change/remove/total`, `context.success`
339
+
340
+ **Note:** `orchestrate` blocks are deprecated. Use `deployment_group` and `deployment_auto_approve` instead.
341
+
342
+ See `references/deployment-blocks.md` for all context variables and patterns.
343
+
344
+ ### Publish Output and Upstream Input Blocks
345
+
346
+ Link Stacks together by publishing outputs from one Stack and consuming them in another:
347
+
348
+ ```hcl
349
+ # In network Stack - publish outputs
350
+ publish_output "vpc_id_network" {
351
+ type = string
352
+ value = deployment.network.vpc_id
353
+ }
354
+
355
+ # In application Stack - consume outputs
356
+ upstream_input "network_stack" {
357
+ type = "stack"
358
+ source = "app.terraform.io/my-org/my-project/networking-stack"
359
+ }
360
+
361
+ deployment "app" {
362
+ inputs = {
363
+ vpc_id = upstream_input.network_stack.vpc_id_network
364
+ }
365
+ }
366
+ ```
367
+
368
+ See `references/linked-stacks.md` for complete documentation and examples.
369
+
370
+ ## Terraform Stacks CLI
371
+
372
+ **Note**: Terraform Stacks is Generally Available (GA) as of Terraform CLI v1.13+. Stacks now count toward Resources Under Management (RUM) for HCP Terraform billing.
373
+
374
+ ### Initialize and Validate
375
+
376
+ ```bash
377
+ terraform stacks init # Download providers, modules, generate lock file
378
+ terraform stacks providers-lock # Regenerate lock file (add platforms if needed)
379
+ terraform stacks validate # Check syntax without uploading
380
+ ```
381
+
382
+ ### Deployment Workflow
383
+
384
+ **Important**: No `plan` or `apply` commands. Upload configuration triggers deployment runs automatically.
385
+
386
+ ```bash
387
+ # 1. Upload configuration (triggers deployment runs)
388
+ terraform stacks configuration upload
389
+
390
+ # 2. Monitor deployments
391
+ terraform stacks deployment-run list # List runs (non-interactive)
392
+ terraform stacks deployment-group watch -deployment-group=... # Stream status updates
393
+
394
+ # 3. Approve deployments (if auto-approve not configured)
395
+ terraform stacks deployment-run approve-all-plans -deployment-run-id=...
396
+ terraform stacks deployment-group approve-all-plans -deployment-group=...
397
+ terraform stacks deployment-run cancel -deployment-run-id=... # Cancel if needed
398
+ ```
399
+
400
+ ### Configuration Management
401
+
402
+ ```bash
403
+ terraform stacks configuration list # List configuration versions
404
+ terraform stacks configuration fetch -configuration-id=... # Download configuration
405
+ terraform stacks configuration watch # Monitor upload status
406
+ ```
407
+
408
+ ### Other Commands
409
+
410
+ ```bash
411
+ terraform stacks create # Create new Stack (interactive)
412
+ terraform stacks fmt # Format Stack files
413
+ terraform stacks list # Show all Stacks
414
+ terraform stacks version # Display version
415
+ terraform stacks deployment-group rerun -deployment-group=... # Rerun deployment
416
+ ```
417
+
418
+ ## Monitoring Deployments with HCP Terraform API
419
+
420
+ For programmatic monitoring in automation, CI/CD, or non-interactive environments (like AI agents), use the HCP Terraform API instead of CLI watch commands. The API provides endpoints for:
421
+
422
+ - Configuration status and validation
423
+ - Deployment group summaries
424
+ - Deployment run status
425
+ - Deployment step details (plan/apply)
426
+ - Error diagnostics with file locations and code snippets
427
+ - Stack outputs via artifacts endpoint
428
+
429
+ **Key points:**
430
+ - CLI watch commands stream indefinitely and don't work in automation
431
+ - Use artifacts endpoint to retrieve Stack outputs: `GET /api/v2/stack-deployment-steps/{step-id}/artifacts?name=apply-description`
432
+ - Diagnostics endpoint requires `stack_deployment_step_id` query parameter
433
+ - Artifacts endpoint returns HTTP 307 redirect (use `curl -L`)
434
+
435
+ For complete API workflow, authentication, polling best practices, and example scripts, see `references/api-monitoring.md`.
436
+
437
+ ## Common Patterns
438
+
439
+ **Component Dependencies**: Dependencies are automatically inferred when one component references another's output (e.g., `subnet_ids = component.vpc.private_subnet_ids`).
440
+
441
+ **Multi-Region Deployment**: Use `for_each` on providers and components to deploy across multiple regions. Each region gets its own provider configuration and component instances.
442
+
443
+ **Deferred Changes**: Stacks support deferred changes to handle dependencies where values are only known after apply. This enables complex multi-component deployments where some resources depend on runtime values from other components (cluster endpoints, generated passwords, etc.).
444
+
445
+ For complete examples including multi-region deployments, component dependencies, deferred changes patterns, and linked Stacks, see `references/examples.md`.
446
+
447
+ ## Best Practices
448
+
449
+ 1. **Component Granularity**: Create components for logical infrastructure units that share a lifecycle
450
+ 2. **Module Compatibility**:
451
+ - Modules used with Stacks cannot include provider blocks (configure providers in Stack configuration)
452
+ - **Test public registry modules** before using in production Stacks - some modules may have compatibility issues
453
+ - Consider using raw resources for critical infrastructure if module compatibility is uncertain
454
+ - Example: Some terraform-aws-modules versions have been found to have compatibility issues with Stacks (e.g., ALB and ECS modules)
455
+ 3. **State Isolation**: Each deployment has its own isolated state
456
+ 4. **Input Variables**: Use variables for values that differ across deployments; use locals for shared values
457
+ 5. **Provider Lock Files**: Always generate and commit `.terraform.lock.hcl` to version control
458
+ 6. **Naming Conventions**: Use descriptive names for components and deployments
459
+ 7. **Deployment Groups**: You can organize deployments into deployment groups. Deployment groups enable auto-approval rules, logical organization, and provide a foundation for scaling. Deployment groups are an HCP Terraform Premium tier feature
460
+ 8. **Testing**: Test Stack configurations in dev/staging deployments before production
461
+
462
+ ## Troubleshooting
463
+
464
+ **Circular Dependencies**: Refactor to break circular references or use intermediate components.
465
+
466
+ **Deployment Destruction**: Cannot destroy from UI. Set `destroy = true` in deployment block, upload configuration, and HCP Terraform creates a destroy run.
467
+
468
+ **Empty Diagnostics**: Add required `stack_deployment_step_id` query parameter to diagnostics API requests.
469
+
470
+ **Module Compatibility**: Test public registry modules before production use. Some modules may have compatibility issues with Stacks.
471
+
472
+ ## References
473
+
474
+ For detailed documentation, see:
475
+ - `references/component-blocks.md` - Complete component block reference with all arguments and syntax
476
+ - `references/deployment-blocks.md` - Complete deployment block reference with all configuration options
477
+ - `references/linked-stacks.md` - Publish outputs and upstream inputs for linking Stacks together
478
+ - `references/examples.md` - Complete working examples for multi-region and component dependencies
479
+ - `references/api-monitoring.md` - Full API workflow for programmatic monitoring and automation
480
+ - `references/troubleshooting.md` - Detailed troubleshooting guide for common issues and solutions