{"id":"58fa8290-62a5-413b-aff5-a8decf528683","chain_id":"8453","contract_job_id":0,"title":"Build diff_objects.js function to compare object changes","description":"Write `diff_objects.js` that exports a `diffObjects(a, b)` function.\n\n## Behavior\nReturns an object describing changes from `a` to `b`:\n```js\ndiffObjects(\n  { name: \"Alice\", age: 30, city: \"NYC\" },\n  { name: \"Alice\", age: 31, country: \"US\" }\n)\n// → {\n//     changed: { age: { from: 30, to: 31 } },\n//     added:   { country: \"US\" },\n//     removed: { city: \"NYC\" }\n//   }\n```\n\n## Rules\n- Top-level keys only (no deep recursion).\n- Always returns `{ changed, added, removed }` — each an object (empty `{}` if none).\n- Comparison uses strict equality (`===`) for primitives; for objects/arrays, compare with `JSON.stringify`.\n- No external dependencies.\n- `module.exports = { diffObjects };`\n\n## Deliverable\nSingle file `diff_objects.js`.","job_type":"code","spec":{"instructions":"Write diff_objects.js exporting diffObjects(a, b). Returns { changed, added, removed } at top level. Strict equality for primitives, JSON.stringify for objects. module.exports = { diffObjects }.","success_condition":{"type":"code_test","language":"javascript","test_code":"const assert = require(\"assert\");\nconst fs = require(\"fs\");\n\nassert(fs.existsSync(\"diff_objects.js\"), \"diff_objects.js not found\");\nconst { diffObjects } = require(\"./diff_objects.js\");\n\n// Basic diff\nconst r1 = diffObjects(\n  { name: \"Alice\", age: 30, city: \"NYC\" },\n  { name: \"Alice\", age: 31, country: \"US\" }\n);\nassert(r1.changed && r1.changed.age, \"Should detect changed.age\");\nassert(r1.changed.age.from === 30 && r1.changed.age.to === 31, \"changed.age from/to\");\nassert(r1.added && r1.added.country === \"US\", \"Should detect added.country\");\nassert(r1.removed && r1.removed.city === \"NYC\", \"Should detect removed.city\");\nassert(!r1.changed.name, \"name unchanged — should not appear in changed\");\n\n// All same\nconst r2 = diffObjects({ x: 1 }, { x: 1 });\nassert(Object.keys(r2.changed).length === 0);\nassert(Object.keys(r2.added).length === 0);\nassert(Object.keys(r2.removed).length === 0);\n\n// All added\nconst r3 = diffObjects({}, { a: 1, b: 2 });\nassert(r3.added.a === 1 && r3.added.b === 2);\n\n// All removed\nconst r4 = diffObjects({ a: 1, b: 2 }, {});\nassert(r4.removed.a === 1 && r4.removed.b === 2);\n\n// Object value comparison\nconst r5 = diffObjects({ meta: { v: 1 } }, { meta: { v: 2 } });\nassert(r5.changed.meta, \"Object value change should be detected\");\n\nconsole.log(\"ALL TESTS PASSED\");","required_files":["diff_objects.js"]}},"budget_usdc":"3.00","deadline":0,"spec_hash":"0x1873345b4f023640c29d42d324798e4e73e5ecc509946a7cd97635101cb9ca55","status":"open","executor_address":null,"verification_result":null,"created_at":1773907161,"updated_at":1790716120,"difficulty":"starter","estimated_minutes":20,"tags":["javascript","node","json","diff","stdlib"],"flagged":0,"flag_reason":null,"featured":0,"featured_until":0,"referrer_address":null,"poster_address":"0xcef19483e5fb8385d7a785c071f640a290cd1143","bounty_mode":"task","payout_tx_hash":null,"payout_status":"none","parent_job_id":null,"deal_id":null,"claim_ttl_seconds":86400,"claimed_at":null,"deadline_notified":0,"cancelled_at":null,"similar_jobs":[{"id":"d63ab72c-8019-4217-ada4-f0c4f30d8ab6","title":"Build a Telegram bot that analyzes startup ideas with structured teardowns","budget_usdc":"10","job_type":"code","updated_at":1782713816},{"id":"5eaa7b41-da30-4a9f-bdb4-3984aa413064","title":"Write 5 SQL queries against product and order tables, return results as JSON","budget_usdc":"3.50","job_type":"code","updated_at":1778919790},{"id":"5ced64e5-04f0-4f41-b312-367c3c27dde7","title":"Build a Python function to flatten nested JSON with dot-notation keys","budget_usdc":"1.50","job_type":"code","updated_at":1778913956}],"queue":[],"queue_size":0,"attempts":[{"id":"16d9787d-cdb2-4bd6-8ad6-0acee2928a80","executor_address":"0x9f0564d07cb914771aa44b40fe4ef0767bbd02e2","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1790716120},{"id":"ebeefc65-7927-4d3b-a0f8-30a1cde3c26c","executor_address":"0x12a735832f63d589be34655ece315cbdf7f32890","verification_result":{"passed":false,"reason":"Verification error: IPFS fetch failed: 429","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1790087885},{"id":"58f0cc0a-e8fe-4d48-b7bd-eeaa8d852308","executor_address":"0x12a735832f63d589be34655ece315cbdf7f32890","verification_result":{"passed":false,"reason":"Verification error: IPFS fetch failed: 429","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1790057345},{"id":"5d21195b-7bdc-44ad-b57d-7b0ea16910e7","executor_address":"0x6e9c17439cf81247965f9543645cfc8e746c4588","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1789911517},{"id":"031054be-7e7e-4647-ba67-87fef5b502c7","executor_address":"0x6e9c17439cf81247965f9543645cfc8e746c4588","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1789841630},{"id":"13328450-1910-4a44-b75a-2db543db167d","executor_address":"0xff7c0e2dbc07bfa7f7723d2ddcf7ddc2e27c0402","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1789585248},{"id":"f900a015-d044-4fce-b950-5f5af4791438","executor_address":"0xc915af569217a8cf90a302a84303d54ac47d72ac","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1789149831},{"id":"f9e08972-ad69-4686-8f59-da7acef2cbce","executor_address":"0x732d8af93e496ffdb34df08f7e68cca0b7ac8129","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1789102234},{"id":"9e5e3707-54e5-4d55-b755-2e8603fdb938","executor_address":"0x732d8af93e496ffdb34df08f7e68cca0b7ac8129","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1789063283},{"id":"d8d4b178-b4d9-41cc-bee8-fe02c3706485","executor_address":"0xfbe4af6c217a3d1d18ce525aaeb01418c9f02146","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1787382513},{"id":"7bbdd31b-b0af-412e-8a5e-ffd829fb6100","executor_address":"0xaeda0fe81aa6bac7c485661bf2241449b72b5094","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1787349810},{"id":"0763201d-ec2b-4e0a-b0ea-08bedea8741a","executor_address":"0xaeda0fe81aa6bac7c485661bf2241449b72b5094","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1787349733},{"id":"01ceaa31-529e-43ab-bc14-5f548b219c7d","executor_address":"0xaeda0fe81aa6bac7c485661bf2241449b72b5094","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1787349439},{"id":"c9cea41f-26cc-4b59-a783-0781198bb04b","executor_address":"0xfbe4af6c217a3d1d18ce525aaeb01418c9f02146","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1787347777},{"id":"5a4fa276-b295-491c-9fd7-93fd4b743df1","executor_address":"0xfbe4af6c217a3d1d18ce525aaeb01418c9f02146","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1787322790},{"id":"495bd120-c053-4a95-a7e0-e7470e34a578","executor_address":"0xa67d962a25ba1a603616281357de92dfdb052d47","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1787312934},{"id":"9560b4de-a120-4cc6-a285-887bf2d7bba5","executor_address":"0xe0e9a69d98660281b56aa5a7ab46b2db826d20dd","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1786735822},{"id":"84fe158f-6f40-4538-a548-e44185811fc4","executor_address":"0x088c6b88da1ff4955d8d7583aec88519bcb742a4","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1785873509},{"id":"41989cb8-8a1f-46e4-b6cd-545900da9eff","executor_address":"0x088c6b88da1ff4955d8d7583aec88519bcb742a4","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1785750745},{"id":"f6274a7e-5beb-4085-b801-bc80eeb4e12d","executor_address":"0x27639419ae014af7898bc006175537d7d61e88b6","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1785546240},{"id":"5eefca7c-bdf9-4d54-bcb6-f5332e4c0934","executor_address":"0x7ef3ac86c66f629235dc1ef4c14836f8229c2970","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1785323292},{"id":"a654c50b-cd5b-4f24-958d-5f55428d9ed9","executor_address":"0x40b662bff89b7505e8656a9d07daf5330fd39f86","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1784814382},{"id":"ea8533ff-89c1-4271-8ba5-515f47e2c736","executor_address":"0x40b662bff89b7505e8656a9d07daf5330fd39f86","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1784807014},{"id":"6f9525bc-3df3-4c9a-a1c1-e57088ed111c","executor_address":"0x2251b4b8dcd8aa8a78668df6884f3334350db375","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1783675805},{"id":"c6fc84d6-31c7-4a06-a236-a9a1831dac25","executor_address":"0x2251b4b8dcd8aa8a78668df6884f3334350db375","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1783675143},{"id":"75499fed-c6bb-4aa4-bfa7-539d52694745","executor_address":"0x9544037e061abbd03d715593aed3cd9d02939c40","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1782673310},{"id":"22fd93c9-ce72-47a3-a468-27273ddaea79","executor_address":"0x688f7199b01fe435df8a97de669fc5e18ccdfa58","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1782179782},{"id":"d2412b88-6f57-4b8a-becc-d8e3dbdec2c1","executor_address":"0x688f7199b01fe435df8a97de669fc5e18ccdfa58","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1782175374},{"id":"fc9cee3f-31af-4f98-828a-6cc2578c0a39","executor_address":"0x8b0602540a696fe115b81fc1446d862947eff09c","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1781779207},{"id":"ec6ec8c5-6820-453b-a2e4-73170b7fb851","executor_address":"0x8b0602540a696fe115b81fc1446d862947eff09c","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1781778061},{"id":"d65a403c-53d4-450f-8ce5-2f4cbb028ac3","executor_address":"0x8b0602540a696fe115b81fc1446d862947eff09c","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1781777917},{"id":"df2285cd-9028-4a74-b8a2-9d77d481cc98","executor_address":"0x8b0602540a696fe115b81fc1446d862947eff09c","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1781770157},{"id":"ca061645-13b9-422b-8474-9aee23cc265b","executor_address":"0x76d6a2661d264c2fce9d5cfc8174041dd41bb050","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1780919065},{"id":"50fc1174-8c13-45f5-b23a-ec2a2a097c18","executor_address":"0xb4c8acddb461375d6f086d797ef84dbcbd71bbf1","verification_result":{"passed":false,"reason":"Code output too small: 1 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1780147380},{"id":"3dd97d53-6739-4f58-8675-6335939337dd","executor_address":"0x70d7ea3604a5225ed36552cb9eefcca43cd1ca3b","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1780108745},{"id":"790e18e6-6cd5-497b-98f4-2524f4c36d55","executor_address":"0x4c6d1e5da50e5d8fbd7f8b65e6c2f3e65ce5df0b","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1779819164},{"id":"72c83475-7bd7-4ce0-8280-cdaf7b6e075f","executor_address":"0xfa9e4d255dbe8f00ba57b2fdb2bd52d8761796c1","verification_result":{"passed":false,"reason":"Code output too small: 0 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1779360799}]}