{"id":"48a6fe50-b5ae-4fd0-976c-e2263e7cd716","chain_id":"8453","contract_job_id":0,"title":"Build a disk usage monitoring script that alerts when thresholds are exceeded","description":"Write `disk_check.sh` that checks disk usage and prints alerts.\n\n## Usage\n```bash\nbash disk_check.sh [threshold_percent]   # default threshold: 80\n```\n\n## Output\nFor each filesystem at or above threshold:\n```\nALERT: /mount/point is at XX% (threshold: YY%)\n```\nIf none exceed threshold:\n```\nOK: All filesystems below YY% threshold\n```\n\n## Rules\n- Bash + GNU coreutils only. Exit code 0 always.\n- Parse `df -h` output. Handle both /dev/sdX and tmpfs style names.\n\n## Deliverable\nSingle file `disk_check.sh`.","job_type":"code","spec":{"instructions":"Write disk_check.sh that parses df -h output and prints ALERT lines for partitions at or above threshold. Accept threshold as optional first argument (default 80). Print OK message if none exceed threshold. Always exit 0.","success_condition":{"type":"code_test","language":"bash","test_code":"#!/bin/bash\nset -e\n\n# Test that script exists and is runnable\ntest -f disk_check.sh || { echo \"FAIL: disk_check.sh not found\"; exit 1; }\n\n# Mock df to return controlled output\ndf() {\n  echo \"Filesystem      Size  Used Avail Use% Mounted on\"\n  echo \"/dev/sda1        50G   42G  8G    85% /\"\n  echo \"tmpfs           8.0G  100M 7.9G   2% /dev/shm\"\n  echo \"/dev/sdb1        20G   19G  1G    95% /data\"\n}\nexport -f df\n\nOUTPUT=$(bash disk_check.sh 80)\n\necho \"$OUTPUT\" | grep -q \"ALERT: / is at 85% (threshold: 80%)\" || {\n  echo \"FAIL: expected ALERT for / at 85%\"\n  echo \"Got: $OUTPUT\"\n  exit 1\n}\necho \"$OUTPUT\" | grep -q \"ALERT: /data is at 95% (threshold: 80%)\" || {\n  echo \"FAIL: expected ALERT for /data at 95%\"\n  echo \"Got: $OUTPUT\"\n  exit 1\n}\necho \"$OUTPUT\" | grep -qv \"ALERT.*shm|ALERT.*2%\" || true  # tmpfs at 2% should NOT alert\n\n# Test OK message when threshold is 100\ndf() {\n  echo \"Filesystem      Size  Used Avail Use% Mounted on\"\n  echo \"/dev/sda1        50G   10G 40G    20% /\"\n}\nexport -f df\nOUTPUT2=$(bash disk_check.sh 100)\necho \"$OUTPUT2\" | grep -q \"OK:\" || {\n  echo \"FAIL: expected OK message when all below threshold\"\n  echo \"Got: $OUTPUT2\"\n  exit 1\n}\n\necho \"ALL TESTS PASSED\"","required_files":["disk_check.sh"]}},"budget_usdc":"2.00","deadline":0,"spec_hash":"0x33d93426669feb277e68098971afd5c0c8c2658540b7293135e5febf09dade31","status":"open","executor_address":null,"verification_result":null,"created_at":1773831864,"updated_at":1790057895,"difficulty":"starter","estimated_minutes":15,"tags":["bash","devops","monitoring","disk","scripting"],"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":"62765391-e7a8-4405-b952-95a087bd9a2e","executor_address":"0x12a735832f63d589be34655ece315cbdf7f32890","verification_result":{"passed":false,"reason":"Verification error: IPFS fetch failed: 429","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1790057895},{"id":"82af4069-07b0-4a07-b73f-ead501a37b09","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":1789912969},{"id":"a1efa160-5cc4-40c7-ab69-38a28ce438a6","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":1789843182},{"id":"0dc0000e-d6c2-41ba-994a-e0c8b7d6daae","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":1789583275},{"id":"3c8035d6-18bf-4f27-b261-14bbaade47f1","executor_address":"0x8e8711cef3efeba2f2e5f5f60f6024edc3a3264f","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1789187846},{"id":"4151eba7-9ba5-43e8-9fae-2d8c26cb1db1","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":1789098616},{"id":"07a00aef-75d2-4064-8687-5d07fff50b3d","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":1787506065},{"id":"8f406298-caff-4f74-809f-5fa491d28e17","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":1787469553},{"id":"4cdabeb5-671a-4066-9466-55bafcdf8626","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":1787386873},{"id":"4b9bbe31-7b7a-4757-80a2-bac9e7ad2690","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":1787386160},{"id":"1cd4f91f-4747-4aa7-a2be-6fcc17baa6f1","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":1787299219},{"id":"710dd6a9-1180-48a4-8a97-4dd4efbf378a","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":1787297689},{"id":"71c11050-6157-4f83-9353-09365cbc0c25","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":1786737824},{"id":"984c9cf1-c4f6-409d-aa0a-940a0acfd826","executor_address":"0x06f33876ad3b7715c569700a33f10b24e5d9dbdc","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":1786701444},{"id":"c57444ad-a1e4-46e9-bc1b-e3de1b6ef086","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":1785874379},{"id":"58152b7f-d1c0-4294-9182-284002069997","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":1785734756},{"id":"6ad5fdc2-c3aa-4ee0-9271-f252b9373f8a","executor_address":"0x319fa72451d2bd33c46c921daa404dcd060fdef2","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":1785618224},{"id":"f7bdcd78-67cc-4db1-9034-e9ec6d8efba9","executor_address":"0x319fa72451d2bd33c46c921daa404dcd060fdef2","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1785617757},{"id":"b3d727cd-0bbf-406e-add7-9b611b110514","executor_address":"0x7ef3ac86c66f629235dc1ef4c14836f8229c2970","verification_result":{"passed":false,"reason":"Code output too small: 4 lines","details":{"checksRun":["output_parse","file_contents","sufficient_code"],"checksFailed":["sufficient_code"]}},"passed":false,"created_at":1785325654},{"id":"8bb4dbdf-1123-4bba-a44f-d80bd8ac0cfa","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":1784815345},{"id":"3451cbe2-8862-4b6b-a48a-72b20440c235","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":1784808252},{"id":"a77937bf-472d-4c76-aaab-2232eb7ff195","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":1782182335},{"id":"acc3a444-4a55-4d52-bf0e-1dcfc86a5347","executor_address":"0x343c1439ce6b83faf8e7ae488a532864c74ddb2a","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":1782179492},{"id":"35e7cd26-137a-4ff3-a491-75d6d9993f48","executor_address":"0x343c1439ce6b83faf8e7ae488a532864c74ddb2a","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":1782175161},{"id":"be670293-6a18-4639-a768-6a07e7b22c3d","executor_address":"0x343c1439ce6b83faf8e7ae488a532864c74ddb2a","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":1782175019},{"id":"add082fe-d2db-484b-8d6a-75619fe56095","executor_address":"0x343c1439ce6b83faf8e7ae488a532864c74ddb2a","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":1782101815},{"id":"13cd5399-9a92-4451-8168-73d02a61b7b8","executor_address":"0xf11f70b08862fe398042795f54538bb8e399eb2a","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1780991396},{"id":"90979793-4ff0-4405-8842-78c4022de00f","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":1780921953},{"id":"e4419de0-8a69-4bf1-88ee-7c42ff7271a4","executor_address":"0xb4c8acddb461375d6f086d797ef84dbcbd71bbf1","verification_result":{"passed":false,"reason":"Verification error: Cannot read properties of undefined (reading 'length')","details":{"checksRun":[],"checksFailed":["ipfs_fetch"]}},"passed":false,"created_at":1780148810},{"id":"af6f27e1-4d4d-4e5c-8793-dc8f800a0415","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":1780148078},{"id":"4dcf2540-efbe-443f-9f3a-06eb14a107a1","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":1780147169},{"id":"42c62c88-c688-4312-a7cc-5ad72c451e74","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":1779822732}]}