toga-ai 1.0.1104 → 1.0.1106
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.
- package/knowledge/1.0/apps/library/INDEX.md +1 -0
- package/knowledge/1.0/apps/library/features/error-capture-1-0.md +4 -3
- package/knowledge/1.0/apps/library/features/php-8-5-runtime-compatibility.md +58 -0
- package/knowledge/1.0/apps/tools/workflows/deploy-to-elastic-beanstalk-al2023.md +10 -6
- package/knowledge/1.0/apps/walmart-activate/INDEX.md +5 -0
- package/knowledge/1.0/apps/walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md +54 -0
- package/knowledge/INDEX.md +2 -1
- package/knowledge/clients/walmart/profile.md +5 -4
- package/knowledge/registry.json +10 -0
- package/package.json +1 -1
- package/scripts/hooks/start-gate.js +3 -0
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
| [NetSuite SuiteQL/REST API Reference](features/netsuite-suiteql-api-reference.md) | Working reference for the Agilant NetSuite REST/SuiteQL integration (`App_Api_Netsuite_Rest`): auth, SuiteQL mechanics, table schemas, type/status codes, perfor |
|
|
34
34
|
| [NetSuite SuiteQL/REST Shim — Field Semantics](features/netsuite-suiteql-rest-shim.md) | Non-obvious NetSuite SuiteQL/REST field semantics behind `App_Api_Netsuite_Rest` shims (signs, `tl.id`==line, `iscogs`, ShipItem cost, `createdFrom`, shim-shape |
|
|
35
35
|
| [NetSuite Sync Alert Monitor (App_SystemMonitor_NetSuiteIntegration)](features/netsuite-sync-alert-monitor.md) | 1.0 monitor `App_SystemMonitor_NetSuiteIntegration` — flags stale per-client NetSuite sync checkpoints (>48h) to ClickUp; open when a sync-stale alert is missin |
|
|
36
|
+
| [Running library (1.0) on PHP 8.4 / 8.5 — deprecations that kill requests](features/php-8-5-runtime-compatibility.md) | Which library calls/signatures fatal a 1.0 app on PHP 8.4/8.5, the guard pattern that stays PHP 7.2 safe, what is fixed and what is still open; open before movi |
|
|
36
37
|
| [Startech PC Matic B2B Sync (library)](features/startech-pcmaticb2b-sync.md) | PC Matic B2B bidirectional ticket sync between TOGaDesk 1.0 and TOGA 2.0 (`App_Api_Toga2`); open for ticket-type maps, StarTech client onboarding, the per-clien |
|
|
37
38
|
| [App_Api_Toga2 — TOGa2 API Client & 1.0↔2.0 Sync Bridge](features/toga2-api-client-and-bridge.md) | `App_Api_Toga2` — the 1.0-side client for the TOGa2/api2 REST API + cross-framework sync routines (`send`/`authenticate`, options DSL, `syncWithToga`/`syncWithT |
|
|
38
39
|
| [Transfer order ↔ PO link reconcile (both directions, header + line, from NetSuite)](features/transfer-order-purchase-order-link-reconcile.md) | `App_Api_Toga2::reconcileTransferOrderPurchaseOrderLinks()` makes one TO's PO links (upstream + downstream, header + line) match NetSuite; open before touching |
|
|
@@ -6,8 +6,8 @@ project: Library
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-10-
|
|
10
|
-
owners: ["jcardinal", "mhammontree", "bala", "snaredla"]
|
|
9
|
+
updated: 2026-10-22
|
|
10
|
+
owners: ["jcardinal", "mhammontree", "bala", "snaredla", "rgirish"]
|
|
11
11
|
files:
|
|
12
12
|
- library/app/error/capture.php
|
|
13
13
|
- library/app/error.php
|
|
@@ -123,13 +123,14 @@ Two things are specifically 1.0:
|
|
|
123
123
|
- **A `*/` inside PHP docblock prose silently closes the comment early.** Writing something like `list*/fetch*` in a `/** … */` block ends the docblock at the `*/`, and `php -l` then reports a confusing `syntax error, unexpected token` on a later line. Hit while documenting the NetSuite throw sites. Avoid the literal `*/` in docblock text.
|
|
124
124
|
- **⚠ A grouped `Logs.Issue` row can show a STALE error id — read the live api2 transaction log for the current error.** Two facts combine to mislead: (1) `Event.errorMessage` is **`varchar(255)`**, so a long API response is **truncated** — often before the trailing error id; and (2) `Logs.Issue.subject` / `Issue.errorMessage` hold the **first-occurrence** text, so a long-lived issue keeps showing the error id from whenever it was first seen even after the per-call error has changed. Observed 2026-08-17: issue `3H` still displayed `EO-1` / `3G-6` (the original undefined-method fatal) while the current per-call failure was actually `EV-11` (an FK 1451 on a DELETE). **To see what is failing *now*, read the live api2 transaction log (`Logs_<client>.Api.responsePayload`) for the specific call — not the grouped `Issue` row.**
|
|
125
125
|
- **Any PHP warning inside capture code would kill the request.** 1.0's `App_Error::handleError()` routes **every** PHP warning into `handleException()`, which renders the red box and calls `exit()` — so a single warning raised while capturing (an unreachable IMDS endpoint is the everyday case: `file_get_contents` warns before returning `false`) terminates the request or cron mid-run while reporting an unrelated error. 2.0's equivalent handler *throws*, which a `catch` absorbs. `captureException()` therefore sets `App_Error::setThrowExceptionsEnabled(false)` for its own duration and restores it in `finally`. This disables the **handler**, not real throws — `App_Query` raises a plain `throw new Exception` on DB errors, so genuine failures still reach the catch. **This is a general 1.0 trap for any code that must not escalate**, not just error capture.
|
|
126
|
-
- **Open, root cause not proven: `Class "App_Error_Capture" not found` hides the real error.** Seen once on tools prod (PHP 8.5, 2026-10-13, first Compass VIP "Check file" click; the next click worked). `App_Error::handleException` (`library/app/error.php` ~line 402) calls `App_Error_Capture::captureException()`; the library autoloader's `require_once` of `app/error/capture.php` itself raised an error, so the handler crashed and the original error was lost. Suspect: a PHP 8.5 deprecation in `capture.php` promoted to a fatal on first compile. Next step: pull the tools EB logs for that time to find the original error.
|
|
126
|
+
- **Open, root cause not proven: `Class "App_Error_Capture" not found` hides the real error.** Seen once on tools prod (PHP 8.5, 2026-10-13, first Compass VIP "Check file" click; the next click worked). `App_Error::handleException` (`library/app/error.php` ~line 402) calls `App_Error_Capture::captureException()`; the library autoloader's `require_once` of `app/error/capture.php` itself raised an error, so the handler crashed and the original error was lost. Suspect: a PHP 8.5 deprecation in `capture.php` promoted to a fatal on first compile. Likely candidate: `ReflectionProperty::setAccessible()` (deprecated 8.5) — guarded with `PHP_VERSION_ID < 80100` on TRUE-83059 (see [PHP 8.5 runtime compatibility](./php-8-5-runtime-compatibility.md)); not proven. Next step: pull the tools EB logs for that time to find the original error.
|
|
127
127
|
- **No typed properties anywhere in `library/`.** 1.0 runs **PHP 7.2**; a deploy failed with `syntax error, unexpected '?'` on `private static ?string $memoryReserve`. Nine typed properties across `error.php`, `error/capture.php`, and `exception/business.php` were converted to untyped with `@var` docblocks. Parameter and return types are fine (7.0/7.1).
|
|
128
128
|
- **An early `return` can make a fallback unreachable.** Two bugs in the first EB-environment attempt: a `return` when `get-config` was not executable skipped the `describe-tags` fallback entirely — i.e. the fallback was dead on the only platform that needed it — and the CLI call omitted `App_Cloud::$preCommands`, so it did not authenticate the way every other 1.0 AWS call does. (`$preCommands` now assumes `WorkloadsRuntime`, which has `ec2:*` — see [1.0 AWS credentials](./app-cloud-aws-credentials.md).)
|
|
129
129
|
- **Fingerprint scheme changes re-group existing issues once.** Moving to file+function frames and the class+entryPoint fallback changes hashes, so open issues re-fingerprint on first occurrence after deploy. Deliberate; merge old hashes onto the curated Issue with the Tools merge-fingerprint box.
|
|
130
130
|
- **⚠ The legacy pre-Sentry handler dumps the entire config on any error it renders.** `library/app/DELETE_DOA_PRE-SENTRY_error.php` is a dead-named but still-reachable handler whose `htmlBacktrace()` does `print_r($entry['args'])` for **every** frame. On 2026-08-05 a real error page on **https://towfoundation.togaview.com** rendered ~26 pages containing the whole config array — production DB host/user/password, SES SMTP credentials, NetSuite credentials, Payeezy API key/secret/merchant token, SSL Store token — plus ticket PII. The current `library/app/error.php` is safe (it dumps only under `App_Registry::inDevMode()`), but **both** handlers gate on `inDevMode()`, so the affected host was **evaluating as dev mode in production**. Two actions: (1) verify `inDevMode()` per host in production before trusting any error page not to leak, and (2) delete the legacy handler. Rotation of every exposed credential **was escalated to Jeff on 2026-08-05; confirmation that it was completed is still owed** — treat those credentials as compromised until confirmed. (No values are recorded here or anywhere in the KB.)
|
|
131
131
|
|
|
132
132
|
## Change history
|
|
133
|
+
- 2026-10-22 — `setAccessible()` guarded for PHP 8.5 in `error.php` / `capture.php`; likely cause of the open handler crash (TRUE-83059) (rgirish)
|
|
133
134
|
- 2026-10-20 — Fixed `\Error` reflection + prod trace dump in `handleException` (TRUE-82959) (snaredla)
|
|
134
135
|
- 2026-10-15 — Vision has no Logs capture (Sentry only); open `\Error` reflection leak in `error.php` (TRUE-82793) (mhammontree)
|
|
135
136
|
- 2026-10-13 — Open issue: handler crash `App_Error_Capture not found` on tools prod hides the real error (TRUE-82662) (bala)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Running library (1.0) on PHP 8.4 / 8.5 — deprecations that kill requests
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
repo: library
|
|
5
|
+
project: Library
|
|
6
|
+
client: shared
|
|
7
|
+
type: feature
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-10-22
|
|
10
|
+
owners: ["rgirish"]
|
|
11
|
+
files:
|
|
12
|
+
- library/app/error.php
|
|
13
|
+
- library/app/error/capture.php
|
|
14
|
+
- library/app/apitransaction.php
|
|
15
|
+
- library/app/string.php
|
|
16
|
+
- library/app/cloud.php
|
|
17
|
+
- library/app/email.php
|
|
18
|
+
- library/app/model/servicerequest.php
|
|
19
|
+
- library/app/soaptransaction.php
|
|
20
|
+
related:
|
|
21
|
+
- error-capture-1-0.md
|
|
22
|
+
- ../../walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md
|
|
23
|
+
- ../../tools/workflows/deploy-to-elastic-beanstalk-al2023.md
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
Which library calls/signatures fatal a 1.0 app on PHP 8.4/8.5, the guard pattern that stays PHP 7.2 safe, what is fixed and what is still open; open before moving any 1.0 app to PHP 8.4+.
|
|
27
|
+
|
|
28
|
+
## Summary
|
|
29
|
+
|
|
30
|
+
`App_Error::handleError` turns every PHP error, including `E_DEPRECATED`, into `handleException()`, which renders and calls `exit`. So on PHP 8.4/8.5 one deprecation — even a compile-time one raised when the autoloader loads a file — ends the request. library must stay PHP 7.2 safe (other 1.0 apps still run 7.2), so fixes are version guards or 7.1-valid syntax, never 8.x-only syntax.
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
Fix patterns (TRUE-83059, commit `d28f9b23`):
|
|
35
|
+
|
|
36
|
+
| Deprecated in | Call / pattern | Fix |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| 8.5 | `curl_close()` (`app/apitransaction.php`) | call only when `PHP_VERSION_ID < 80000` |
|
|
39
|
+
| 8.5 | `xml_parser_free()` (`app/string.php`) | call only when `PHP_VERSION_ID < 80000` |
|
|
40
|
+
| 8.5 | `ReflectionProperty::setAccessible()` (`app/error.php` x3, `app/error/capture.php`) | call only when `PHP_VERSION_ID < 80100` |
|
|
41
|
+
| 8.4 | implicit nullable `string $x = null` | explicit `?string $x = null` (valid since 7.1) |
|
|
42
|
+
|
|
43
|
+
Implicit-nullable fixes so far: `App_Cloud::getDatabaseInstances`, `App_Cloud::sendOverAs2Connector`, `App_Email::setQueueForSending`, `App_Model_ServiceRequest::triggerStatusEvent`.
|
|
44
|
+
|
|
45
|
+
**Find the rest:** run `php -l` with a PHP 8.4+ binary and `-d display_errors=1` on each file — it prints compile-time deprecations per file. Runtime-only ones (`curl_close`, `setAccessible`, `utf8_decode`) need a grep.
|
|
46
|
+
|
|
47
|
+
## Gotchas
|
|
48
|
+
|
|
49
|
+
- **Still open as of 2026-10-22 (will exit any 1.0 app on 8.4/8.5 that loads them):**
|
|
50
|
+
- `app/soaptransaction.php` — `__setSoapHeaders` / `__doRequest` return types do not match `SoapClient`.
|
|
51
|
+
- implicit nullable params: `app/edi.php`, `app/api/nycdoe.php`, `app/api/DOA_nycdoe.php`, `app/api/nycdoev2.php`, `app/api/mcafee.php`, `browser/modal.php`, `browser/sidebar.php`, several `app/model/togadesk/*`.
|
|
52
|
+
- `app/tdemailtoticket.php` has a parse error.
|
|
53
|
+
- `App_Model_ServiceRequest::ajaxLoadItemDialog` uses `utf8_decode` (deprecated 8.2).
|
|
54
|
+
- An app only dies on files it loads — Walmart Activate runs on 8.5 with the open list above because it never loads those classes. A new 8.5 app must re-check its own load path.
|
|
55
|
+
- Local dev on PHP 8.2 does not show 8.4/8.5 deprecations — test with an 8.5 binary.
|
|
56
|
+
|
|
57
|
+
## Change history
|
|
58
|
+
- 2026-10-22 — Created: guard pattern, fixed list, open list from the Walmart Activate 8.5 move (TRUE-83059) (rgirish)
|
|
@@ -6,8 +6,8 @@ project: Tools
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: workflow
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-10-
|
|
10
|
-
owners: [jcardinal, bala]
|
|
9
|
+
updated: 2026-10-22
|
|
10
|
+
owners: [jcardinal, bala, rgirish]
|
|
11
11
|
files:
|
|
12
12
|
- tools/.ebextensions/004_http_to_https.config
|
|
13
13
|
- tools/.ebextensions/008_setup_ldap.config
|
|
@@ -17,7 +17,7 @@ files:
|
|
|
17
17
|
- tools/.ebextensions/050_register_instance_to_shared_application_load_balancer.config
|
|
18
18
|
- tools/.platform/hooks/prebuild/01-install-php-pgsql.sh
|
|
19
19
|
- tools/.platform/hooks/prebuild/02-install-php-redis.sh
|
|
20
|
-
- tools/
|
|
20
|
+
- tools/.platform/hooks/postdeploy/01_link_resources.sh
|
|
21
21
|
- tools/ebs/setup_export_cache_folders.php
|
|
22
22
|
- tools/_/app/framework.php
|
|
23
23
|
- tools/_/app/frameworkindex.php
|
|
@@ -55,9 +55,9 @@ The `application.ini` sets `include_path = ".:/var/www/library"`, upload/post li
|
|
|
55
55
|
|
|
56
56
|
The replacement is pure bash via a cfn-init `files:` block that writes `/tmp/clone_git_repos.sh` (mode `000755`) plus a `container_commands` entry that runs `bash /tmp/clone_git_repos.sh`. It clones:
|
|
57
57
|
- `agilantsolutions/library` branch `_production` → `/var/www/library`
|
|
58
|
-
- `agilantsolutions/resources` branch `_production` → `/var/app/
|
|
58
|
+
- `agilantsolutions/resources` branch `_production` → `/opt/resources`, then `.platform/hooks/postdeploy/01_link_resources.sh` runs `ln -sfn /opt/resources /var/app/current/resources`.
|
|
59
59
|
|
|
60
|
-
`ebs/git.json
|
|
60
|
+
Tools no longer ships `ebs/git.json`. Store and Walmart Activate clone `resources` straight into the AL2023 staging dir `/var/app/staging/resources` instead (see [Walmart Activate deploy](../../walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md)).
|
|
61
61
|
|
|
62
62
|
### Native PHP extensions — prebuild hooks (phpredis, pgsql)
|
|
63
63
|
Native PECL extensions are installed by `.platform/hooks/prebuild/*.sh` scripts, not `.ebextensions`. `02-install-php-redis.sh` installs phpredis (needed for the Redis sessions below); `01-install-php-pgsql.sh` installs pgsql (needed only by the Talos "Knowledge Bases" create flow). Both target the platform php `php-common-8.5.6`. The durable AL2023 gotchas:
|
|
@@ -105,7 +105,7 @@ The deploy clones `agilantsolutions/library` and `resources` via `020_setup_git_
|
|
|
105
105
|
|
|
106
106
|
## Gotchas (durable AL2023 / EB rules)
|
|
107
107
|
- **php-fpm on AL2023 defaults to `clear_env=yes`, so `getenv()` cannot see EB environment properties.** An EB environment property (e.g. `GITHUB_TOKEN`) that is set correctly still returns `false` from `getenv()` under php-fpm on AL2023, because the FPM pool strips the environment. Read such a value from **`getenv()` AND `$_SERVER` AND `$_ENV`** (the property reaches PHP via the superglobals even when `getenv()` is blind), and fall back to a config key for local dev. Never log/echo the value.
|
|
108
|
-
- **Write new-deploy files to `/var/app/
|
|
108
|
+
- **Write new-deploy files to `/var/app/staging/<path>`, never `/var/www/html/<path>` during `container_commands`.** On AL2023 the new bundle is unpacked to `/var/app/staging` (`/var/app/ondeck` is the old AL1 name — it does not exist here). While container_commands run, `/var/www/html` still symlinks to the **old** app. After the deploy swap, `/var/app/staging` becomes `/var/app/current` (= `/var/www/html`). Writing to `/var/www/html` during container_commands writes into the currently-running old app.
|
|
109
109
|
- **Only `/var/log/eb-activity.log` (and `cfn-init.log`) are captured in EB bundle snapshots.** Custom log files under `/var/log/` are invisible unless you SSH the instance. Deploy scripts should log to `/var/log/eb-activity.log`.
|
|
110
110
|
- **CodePipeline-dependent scripts are no-ops for apps without a pipeline.** `setup_git_libraries.php` silently does nothing when the DB has no `CodePipelineEnvironments` row — fatal for a brand-new app, since nothing gets cloned and the failure is silent.
|
|
111
111
|
- **Make clone failures block the deploy.** The bash clone script does `exit 1` on clone failure so the deploy fails visibly, rather than succeeding and serving 500s.
|
|
@@ -118,3 +118,7 @@ The deploy clones `agilantsolutions/library` and `resources` via `020_setup_git_
|
|
|
118
118
|
|
|
119
119
|
## Related
|
|
120
120
|
- [Tools architecture](../architecture.md)
|
|
121
|
+
- [Walmart Activate deploy (same AL2023 pattern, Apache proxy)](../../walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md)
|
|
122
|
+
|
|
123
|
+
## Change history
|
|
124
|
+
- 2026-10-22 — Staging dir corrected `/var/app/ondeck` → `/var/app/staging`; resources now `/opt/resources` + postdeploy symlink (TRUE-83059) (rgirish)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# walmart-activate (Walmart Activate) — 1.0 knowledge
|
|
2
|
+
|
|
3
|
+
| Doc | Summary |
|
|
4
|
+
|-----|---------|
|
|
5
|
+
| [Deploying Walmart Activate to Elastic Beanstalk (PHP 8.5 / Amazon Linux 2023)](workflows/deploy-to-elastic-beanstalk-al2023.md) | How walmart-activate (walmart.truesolutions.com) deploys on EB PHP 8.5 / AL2023 — Apache proxy, git clone of library/resources/dbchanges, Redis sessions, no s3f |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Deploying Walmart Activate to Elastic Beanstalk (PHP 8.5 / Amazon Linux 2023)
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
repo: walmart-activate
|
|
5
|
+
project: Walmart Activate
|
|
6
|
+
client: shared
|
|
7
|
+
type: workflow
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-10-22
|
|
10
|
+
owners: ["rgirish"]
|
|
11
|
+
files:
|
|
12
|
+
- walmart-activate/.ebextensions/001_platform.config
|
|
13
|
+
- walmart-activate/.ebextensions/005_php_cve_2026_mitigation.config
|
|
14
|
+
- walmart-activate/.ebextensions/009_setup_phpini.config
|
|
15
|
+
- walmart-activate/.ebextensions/020_setup_git_libraries.config
|
|
16
|
+
- walmart-activate/.platform/hooks/prebuild/02-install-php-redis.sh
|
|
17
|
+
- walmart-activate/.platform/hooks/prebuild/03-setup-cache-folder.sh
|
|
18
|
+
- walmart-activate/.platform/httpd/conf.d/http_to_https.conf
|
|
19
|
+
- walmart-activate/_/app/framework.php
|
|
20
|
+
- walmart-activate/ebs/git.json
|
|
21
|
+
- walmart-activate/.htaccess
|
|
22
|
+
related:
|
|
23
|
+
- ../../tools/workflows/deploy-to-elastic-beanstalk-al2023.md
|
|
24
|
+
- ../../library/features/php-8-5-runtime-compatibility.md
|
|
25
|
+
- ../../../../clients/walmart/profile.md
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
How walmart-activate (walmart.truesolutions.com) deploys on EB PHP 8.5 / AL2023 — Apache proxy, git clone of library/resources/dbchanges, Redis sessions, no s3fs; open before touching `.ebextensions`/`.platform` or deploying it.
|
|
29
|
+
|
|
30
|
+
## Summary
|
|
31
|
+
|
|
32
|
+
walmart-activate moved from AL1 to EB PHP 8.5 / Amazon Linux 2023 on TRUE-83059, copying the Tools/Store pattern (Store: TRUE-83055). Shared AL2023 rules (ini via cfn-init `files:`, rediscluster via `ini_set()`, PECL redis install, clone fails the deploy) live in the [Tools deploy doc](../../tools/workflows/deploy-to-elastic-beanstalk-al2023.md) — not repeated here. This doc holds only what differs for Walmart.
|
|
33
|
+
|
|
34
|
+
## Steps
|
|
35
|
+
|
|
36
|
+
1. `001_platform.config` sets `aws:elasticbeanstalk:environment:proxy: ProxyServer: apache`. AL2023 defaults to nginx, which ignores the root `.htaccess` front controller (`!-f`/`!-d` → `index.php`).
|
|
37
|
+
2. `009_setup_phpini.config` writes `/etc/php.d/application.ini` (`include_path = ".:/var/www/library"`) with a cfn-init `files:` block.
|
|
38
|
+
3. `020_setup_git_libraries.config` (bash) clones every entry in `ebs/git.json`: `library` → `/var/www/library`, `resources` → `/var/app/staging/resources`, `dbchanges` → `/var/www/dbchanges`. Branch is `_production` when EB property `ENVIRONMENT=prod`, else `_<ENVIRONMENT>`. A missing `ENVIRONMENT` or a clone error exits 1 and fails the deploy.
|
|
39
|
+
4. `030_dbchanges.config` runs `php /var/www/dbchanges/index.php`.
|
|
40
|
+
5. Prebuild hooks: `02-install-php-redis.sh` (`php8.5-pecl-redis6`, excludes `php8.1-*`, copies `redis.so` into the platform `extension_dir`); `03-setup-cache-folder.sh` creates `/var/www/cache`.
|
|
41
|
+
6. `.platform/httpd/conf.d/http_to_https.conf` redirects on `X-Forwarded-Proto != https`.
|
|
42
|
+
7. `App_Framework_Walmart::startSession()` (`_/app/framework.php`) sets rediscluster with `ini_set()`; if the extension is loaded but `session_start()` fails, it logs and falls back to file sessions. `reset.php` clears the session through the same method.
|
|
43
|
+
8. `005_php_cve_2026_mitigation.config`: its file-watch cron skips while `/var/app/staging` (or `/var/app/ondeck`) exists, so it does not fire mid-deploy.
|
|
44
|
+
|
|
45
|
+
## Gotchas
|
|
46
|
+
|
|
47
|
+
- **No s3fs, no symlinks (decided TRUE-83059).** The AL1 s3fs mount, `links.*.json` (pointed at togadesk uploads) and old `ebs` scripts were removed. Walmart writes nothing to `storage_folder`/`export_folder`: the only signature save (`mvc/verify/get.php`) passes empty data, and `App_Model_ServiceRequestSignature::save` writes a file only when `signatureData` is truthy. **If a Walmart flow ever writes documents or exports, bring back s3fs or S3 first.**
|
|
48
|
+
- **Staging dir is `/var/app/staging`** on AL2023. `/var/app/ondeck` is AL1 only.
|
|
49
|
+
- **File-session fallback is per instance.** With more than one instance, a Redis outage logs users out when the load balancer switches instance. Check `error_log` for `Redis session store unreachable`.
|
|
50
|
+
- **PHP 8.5 deprecations are fatal in 1.0** — this app depends on the library fixes in [PHP 8.5 runtime compatibility](../../library/features/php-8-5-runtime-compatibility.md).
|
|
51
|
+
- **OPEN security issue (pre-existing, not fixed):** `.htaccess` rewrites only when the file does not exist (`!-f`), so under Apache the committed `config.*.ini` (DB credentials) and `ebs/git.json` (GitHub clone token) are served as plain files. Proposed fix: a `.platform/httpd/conf.d` deny file — `FilesMatch` for `config.*.ini` / `*.json`, `DirectoryMatch` for `ebs`, `.ebextensions`, `.platform`, `.git`. Also `009` sets `display_errors = On` in prod. Never copy credential values out.
|
|
52
|
+
|
|
53
|
+
## Change history
|
|
54
|
+
- 2026-10-22 — Moved to PHP 8.5 / AL2023 (Apache proxy, bash git clone, Redis via `ini_set`); dropped s3fs/symlinks; logged open config-exposure issue (TRUE-83059) (rgirish)
|
package/knowledge/INDEX.md
CHANGED
|
@@ -4,7 +4,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
4
4
|
|
|
5
5
|
## 1.0 framework
|
|
6
6
|
|
|
7
|
-
- **library** (Library) _(framework core)_ —
|
|
7
|
+
- **library** (Library) _(framework core)_ — 40 doc(s) → [1.0/apps/library/INDEX.md](1.0/apps/library/INDEX.md)
|
|
8
8
|
- **worker** (Worker) — 43 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
|
|
9
9
|
- **dbchanges** (Database Changes) _(framework core)_ — 1 doc(s) → [1.0/apps/dbchanges/INDEX.md](1.0/apps/dbchanges/INDEX.md)
|
|
10
10
|
- **worker1.5** (Worker 1.5) — 0 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
|
|
@@ -12,6 +12,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
12
12
|
- **togaview** (TOGa View) — 8 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
|
|
13
13
|
- **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
|
|
14
14
|
- **walmarttechservices** (Walmart Tech Services) — 1 doc(s) → [1.0/apps/walmarttechservices/INDEX.md](1.0/apps/walmarttechservices/INDEX.md)
|
|
15
|
+
- **walmart-activate** (Walmart Activate) — 1 doc(s) → [1.0/apps/walmart-activate/INDEX.md](1.0/apps/walmart-activate/INDEX.md)
|
|
15
16
|
- **test** (Test) — 18 doc(s) → [1.0/apps/test/INDEX.md](1.0/apps/test/INDEX.md)
|
|
16
17
|
- **toga** (TOGa) — 4 doc(s) → [1.0/apps/toga/INDEX.md](1.0/apps/toga/INDEX.md)
|
|
17
18
|
- **store** (Store) — 4 doc(s) → [1.0/apps/store/INDEX.md](1.0/apps/store/INDEX.md)
|
|
@@ -7,11 +7,12 @@ apps:
|
|
|
7
7
|
- worker
|
|
8
8
|
- library
|
|
9
9
|
- walmarttechservices
|
|
10
|
+
- walmart-activate
|
|
10
11
|
client: walmart
|
|
11
12
|
type: client-feature
|
|
12
13
|
status: active
|
|
13
|
-
updated: 2026-10-
|
|
14
|
-
owners: ["mhammontree"]
|
|
14
|
+
updated: 2026-10-22
|
|
15
|
+
owners: ["mhammontree", "rgirish"]
|
|
15
16
|
files:
|
|
16
17
|
- library/app/client/walmart.php
|
|
17
18
|
- library/app/email/walmartb2c.php
|
|
@@ -33,7 +34,7 @@ Walmart = client ID **7** in `TOGA.Clients`. All Walmart B2C tech services (serv
|
|
|
33
34
|
|
|
34
35
|
| Field | Value |
|
|
35
36
|
|-------|-------|
|
|
36
|
-
| `TOGA.Clients.id` | `7` |
|
|
37
|
+
| `TOGA.Clients.id` | `7` — **unresolved, code disagrees:** `App_Client_Walmart::TOGA_CLIENT_ID = 6` and walmart-activate `mvc/verify/get.php` creates customers/service requests with `clientId = 6`; `worker/crons/toga/toga_walmart_order_reminder.php` uses `7`. Check `TOGA.Clients` before relying on either. |
|
|
37
38
|
| Primary domain | `walmart.truesolutions.com` |
|
|
38
39
|
| Former domain | `walmarttechservices.com` (decommissioned 2026) |
|
|
39
40
|
| Former site repo | `walmarttechservices` — GitHub repo no longer exists (checked 2026-10-16) |
|
|
@@ -44,7 +45,7 @@ Walmart = client ID **7** in `TOGA.Clients`. All Walmart B2C tech services (serv
|
|
|
44
45
|
|
|
45
46
|
- `library/app/client/walmart.php` — `App_Client_Walmart` — sends registration confirmation emails; reads `requireRegistrationUrl` from `TOGA.Clients` to build the registration link.
|
|
46
47
|
- `library/app/email/walmartb2c.php` — `App_Email_WalmartB2C` — base email class for all Walmart B2C transactional emails.
|
|
47
|
-
- `walmart-activate/` — PHP MVC app serving all customer-facing Walmart routes.
|
|
48
|
+
- `walmart-activate/` — PHP MVC app serving all customer-facing Walmart routes. Runs on EB PHP 8.5 / AL2023 — see [deploy doc](../../1.0/apps/walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md).
|
|
48
49
|
|
|
49
50
|
## DB field: requireRegistrationUrl
|
|
50
51
|
|
package/knowledge/registry.json
CHANGED
|
@@ -147,6 +147,16 @@
|
|
|
147
147
|
"library"
|
|
148
148
|
]
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
"repo": "walmart-activate",
|
|
152
|
+
"project": "Walmart Activate",
|
|
153
|
+
"framework": "1.0",
|
|
154
|
+
"role": "app",
|
|
155
|
+
"dependsOn": [
|
|
156
|
+
"library",
|
|
157
|
+
"dbchanges"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
150
160
|
{
|
|
151
161
|
"repo": "talos",
|
|
152
162
|
"project": "TOGa Talos Chat",
|
package/package.json
CHANGED
|
@@ -412,8 +412,11 @@ function buildContext(data) {
|
|
|
412
412
|
return ctx;
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
/* /tmp too: on macOS os.tmpdir() is /var/folders/.../T, but agents often save to /tmp (= /private/tmp),
|
|
416
|
+
* so ticket-reader's save of an inline ClickUp result was blocked and /start could not verify. */
|
|
415
417
|
function safeZonePrefixes() {
|
|
416
418
|
const bases = [path.join(os.homedir(), '.claude'), os.tmpdir(), process.env.TEMP, process.env.TMP];
|
|
419
|
+
if (process.platform !== 'win32') bases.push('/tmp');
|
|
417
420
|
const out = new Set();
|
|
418
421
|
for (const b of bases) if (b) out.add(canon(b));
|
|
419
422
|
return [...out];
|