toga-ai 1.0.1129 → 1.0.1130
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.
|
@@ -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-23
|
|
10
|
+
owners: [jcardinal, mhammontree, bala, snaredla, rgirish]
|
|
11
11
|
files:
|
|
12
12
|
- library/app/cloud.php
|
|
13
13
|
- library/app/systemmonitor/rdsproductioncluster.php
|
|
@@ -21,6 +21,7 @@ files:
|
|
|
21
21
|
- toga/composer.json
|
|
22
22
|
- vision/composer.json
|
|
23
23
|
- store/composer.json
|
|
24
|
+
- walmart-activate/composer.json
|
|
24
25
|
- library/app/database.php
|
|
25
26
|
related:
|
|
26
27
|
- ../../../../2.0/apps/worker2/features/cross-account-aws-access.md
|
|
@@ -74,7 +75,9 @@ CodePipeline `Worker` (502, us-west-2) sources `_production` of **both** `agilan
|
|
|
74
75
|
- **`copyFileToS3()` (and the other CLI-based calls) never report failure.** `shell_exec('aws s3 cp ...')` then `return true` — bad credentials = silent lost upload. Uploads made while the old key was dead (repair photos, KB files, `BLOBSTORAGE` saves via `App_Model::save()`, email-intake attachments) may be missing from S3. Open, not fixed — CTO decision (TRUE-82935): fix it in library on its own ticket.
|
|
75
76
|
- `togadesk` `ebs/check_s3fs.php` + `ebs/register_instance_to_shared_application_load_balancer.php` now assume `WorkloadsRuntime` (TRUE-82718, PR #622, merged 2026-10-13); togaview fix is PR #307 (opened). The s3fs **mount** cannot assume a role — it uses the instance role directly: see [asifiles s3fs mount](../../togadesk/features/s3fs-asifiles-file-storage.md).
|
|
76
77
|
- **Every 1.0 app that bootstraps `library` needs `aws/aws-sdk-php` in its own `composer.json`** (since TRUE-82705). Without it any App_Cloud call fatals `Class 'Aws\Credentials\CredentialProvider' not found`. Hidden trigger: on prod/worker/bigworker, `App_Database::getDatabaseReaderHost()` (`library/app/database.php` ~156) calls `App_Cloud::getParameter('database_reader_endpoint')` whenever its cache file `databaseReadHost.txt` is older than 30-60 s. The fatal hits before the cache is rewritten, so the cache stays stale and **every** reader-DB request fails — the app looks fully down (TRUE-82793: Vision PunchOut for Canon / S&P Global via SAP Ariba returned HTTP 500). Fix = add `"aws/aws-sdk-php": "^3.328"` and pin `composer.lock` to worker's prod versions (aws-sdk-php 3.328.1, guzzle 7.9.2, promises 2.0.4, psr7 2.7.0, jmespath 2.8.0 — PHP 7.2 safe); EB runs `composer install --no-dev` on deploy (`vendor/` is gitignored).
|
|
77
|
-
- Has it (`_production`): worker, togadesk (`^3.337`), togaview, tools, toga (TRUE-82714, 63c5ed0; confirmed 2026-10-16), vision (TRUE-82793, merged + deployed 2026-10-15).
|
|
78
|
+
- Has it (`_production`): worker, togadesk (`^3.337`), togaview, tools, toga (TRUE-82714, 63c5ed0; confirmed 2026-10-16), vision (TRUE-82793, merged + deployed 2026-10-15), walmart-activate (TRUE-83161, d29cbb1, deployed 2026-10-23 — composer + `require_once 'vendor/autoload.php'` at the end of `App_Framework_Walmart::initialize()`).
|
|
79
|
+
- **Any new or moved 1.0 app: check composer first.** A move to a new EB env clones the *current* library, so an app with no `composer.json` breaks on the first DB page even if the old env worked (it ran pre-10/12 library). Pages with no DB query still work, so EB stays Green (walmart-activate `/register`, TRUE-83161).
|
|
80
|
+
- **Testing gotcha:** after one passing run, `databaseReadHost.txt` is fresh for 30-60 s, so a control run right after also passes. Wait > 60 s (or delete the cache file) before the control.
|
|
78
81
|
- store: fixed on branch (TRUE-82856, ae1861f4f — same pins plus aws-crt-php 1.2.7, psr/http-client 1.0.3, polyfill-mbstring 1.31.0; verified on PHP 7.2.33); needs merge + deploy. Its `.ebextensions/015_install_composer.config` already runs `composer install --no-dev`.
|
|
79
82
|
- **Missed by the audit (TRUE-82935): the 1.0 `api` repo** (no composer at all) and **togadesk's email cron** (`crons/tickets.php` loads only `desk/vendor/autoload.php`; the root togadesk composer with aws is not loaded there). Both stopped `App_Cloud`: [Talos ticket API](../../api/features/talos-ticket-endpoint.md), [email intake](../../togadesk/features/email-to-ticket-intake.md). Audit per **entry point**, not per repo: a CLI cron or sub-app can load a different autoloader than the web app.
|
|
80
83
|
- The missing class throws **`Error`, not `Exception`** — `catch (Exception)` around an App_Cloud call does not catch it; use `\Throwable` where a fallback is meant.
|
|
@@ -84,6 +87,7 @@ CodePipeline `Worker` (502, us-west-2) sources `_production` of **both** `agilan
|
|
|
84
87
|
- Every long-lived key still in code across repos (SES SMTP, s3fs, ALB scripts, other accounts): [audit 2026-10-13](../../../../2.0/apps/worker2/features/cross-account-aws-access.md#long-lived-keys-still-in-code-audit-2026-10-13).
|
|
85
88
|
|
|
86
89
|
## Change history
|
|
90
|
+
- 2026-10-23 — walmart-activate added aws-sdk-php; moved-app check + read-host cache testing gotcha (TRUE-83161) (rgirish)
|
|
87
91
|
- 2026-10-22 — Leaked key was abused (Bedrock LLM-jacking, GuardDuty, TRUE-82983) (jcardinal)
|
|
88
92
|
- 2026-10-19 — aws-sdk-php audit missed `api` + togadesk email cron; `Error` not `Exception` (TRUE-82935) (jcardinal)
|
|
89
93
|
- 2026-10-16 — aws-sdk-php: store fixed (TRUE-82856), vision deployed, walmarttechservices + webhook not changed (repo gone / reported inactive) (mhammontree)
|
|
@@ -6,9 +6,11 @@ project: Walmart Activate
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: workflow
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-10-
|
|
9
|
+
updated: 2026-10-23
|
|
10
10
|
owners: ["rgirish"]
|
|
11
11
|
files:
|
|
12
|
+
- walmart-activate/composer.json
|
|
13
|
+
- walmart-activate/.gitignore
|
|
12
14
|
- walmart-activate/.ebextensions/001_platform.config
|
|
13
15
|
- walmart-activate/.ebextensions/005_php_cve_2026_mitigation.config
|
|
14
16
|
- walmart-activate/.ebextensions/009_setup_phpini.config
|
|
@@ -22,6 +24,8 @@ files:
|
|
|
22
24
|
related:
|
|
23
25
|
- ../../tools/workflows/deploy-to-elastic-beanstalk-al2023.md
|
|
24
26
|
- ../../library/features/php-8-5-runtime-compatibility.md
|
|
27
|
+
- ../../library/features/app-cloud-aws-credentials.md
|
|
28
|
+
- ../../../../clients/walmart/features/registration-route.md
|
|
25
29
|
- ../../../../clients/walmart/profile.md
|
|
26
30
|
---
|
|
27
31
|
|
|
@@ -41,14 +45,18 @@ walmart-activate moved from AL1 to EB PHP 8.5 / Amazon Linux 2023 on TRUE-83059,
|
|
|
41
45
|
6. `.platform/httpd/conf.d/http_to_https.conf` redirects on `X-Forwarded-Proto != https`.
|
|
42
46
|
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
47
|
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.
|
|
48
|
+
9. `composer.json` requires `aws/aws-sdk-php ^3.328` (php `>=8.2 <8.6`, same as store); `composer.lock` committed, `/vendor/` gitignored. EB AL2023 PHP runs `composer install` itself. `App_Framework_Walmart::initialize()` ends with `require_once 'vendor/autoload.php';`. Without it every DB page fatals — see [App_Cloud aws-sdk requirement](../../library/features/app-cloud-aws-credentials.md#gotchas) (TRUE-83161).
|
|
44
49
|
|
|
45
50
|
## Gotchas
|
|
46
51
|
|
|
47
52
|
- **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.**
|
|
53
|
+
- **Errors are recorded nowhere.** No Sentry and no `db_toga2logs` link in `config.prod.ini`, so `App_Error` writes no `Logs.Issue` and no php-fpm log line — the user sees only "Oops! Something went wrong." To get the real error, run the page in PHP CLI on the instance via SSM: set `$_SERVER['SCRIPT_FILENAME']=/var/app/current/index.php`, `REQUEST_URI`, `$_GET`, and `ENVIRONMENT` (from `/opt/elasticbeanstalk/deployment/env`), then `include` `index.php`; CLI `renderErrorBox` prints the message.
|
|
54
|
+
- **`/home` working does not mean the site is up.** `/home` makes no DB query; `/register` does. Smoke-test `/register?{enc}=` after every deploy (TRUE-83161: `/register` was down for every customer from the 2026-10-22 move until 2026-10-23, EB Green the whole time).
|
|
48
55
|
- **Staging dir is `/var/app/staging`** on AL2023. `/var/app/ondeck` is AL1 only.
|
|
49
56
|
- **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
57
|
- **PHP 8.5 deprecations are logged, not fatal** (library `_production`, PR #905); warnings and notices still exit. This app depends on the library fixes in [PHP 8.5 runtime compatibility](../../library/features/php-8-5-runtime-compatibility.md).
|
|
51
58
|
- **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. Fix: copy togaview's working `.platform/httpd/conf.d/deny.conf` ([TOGa View deploy](../../togaview/workflows/deploy-to-elastic-beanstalk-al2023.md)). Also `009` sets `display_errors = On` in prod. Never copy credential values out.
|
|
52
59
|
|
|
53
60
|
## Change history
|
|
61
|
+
- 2026-10-23 — Added composer/aws-sdk-php (fixes `/register` Oops box after the move); no-error-capture debug method (TRUE-83161) (rgirish)
|
|
54
62
|
- 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)
|
|
@@ -5,9 +5,10 @@ project: TOGa
|
|
|
5
5
|
client: walmart
|
|
6
6
|
type: client-feature
|
|
7
7
|
status: active
|
|
8
|
-
updated: 2026-
|
|
9
|
-
owners: []
|
|
8
|
+
updated: 2026-10-23
|
|
9
|
+
owners: ["rgirish"]
|
|
10
10
|
files:
|
|
11
|
+
- toga/app/servicerequests/view.php
|
|
11
12
|
- walmart-activate/mvc/register/get.php
|
|
12
13
|
- walmart-activate/mvc/register/post.php
|
|
13
14
|
- library/app/client/walmart.php
|
|
@@ -38,6 +39,8 @@ The `=` at the end is intentional — the encrypted string is the key, the value
|
|
|
38
39
|
$link = 'https://walmart.truesolutions.com/register?' . App_String::encryptString($serviceRequestId) . '=';
|
|
39
40
|
```
|
|
40
41
|
|
|
42
|
+
Entry points: the blast/reminder email, and the TOGa Retail work order page "Confirm Order" button (`toga/app/servicerequests/view.php` ~1978), which opens `requireRegistrationUrl` + `?{encryptString(serviceRequestId)}=`. Data: `TOGA_WalmartEComm.ServiceRequests` / `Contacts`.
|
|
43
|
+
|
|
41
44
|
### GET handler — parsing the key (`mvc/register/get.php`)
|
|
42
45
|
|
|
43
46
|
Extracts the encrypted ID by iterating `$_GET` and taking the first key that is not `success` or `error`:
|
|
@@ -77,6 +80,7 @@ Then decrypts: `$serviceRequestId = (int) App_String::decrypt($encryptedServiceR
|
|
|
77
80
|
- The encrypted ID is the **key**, not the value. `?enc=value` format would break parsing.
|
|
78
81
|
- `App_String::encryptString()` and `App_String::decrypt()` are the inverse pair — do not mix with other encryption helpers.
|
|
79
82
|
- Registration URL base comes from `TOGA.Clients.requireRegistrationUrl` for client id=7. If this DB field is wrong, all registration links break.
|
|
83
|
+
- **"Oops! Something went wrong." for every customer = server error, not bad data.** walmart-activate records errors nowhere; see the [deploy doc](../../../1.0/apps/walmart-activate/workflows/deploy-to-elastic-beanstalk-al2023.md#gotchas) for the SSM CLI way to see the real message. TRUE-83161 cause: missing `aws/aws-sdk-php` after the move to toga-prod.
|
|
80
84
|
- Image paths in the view must use absolute paths (`/assets/img/...`) — relative paths break on URLs with a trailing slash.
|
|
81
85
|
|
|
82
86
|
## Related
|
package/package.json
CHANGED